Skip to content

Commit

Permalink
Merge remote-tracking branch 'Gordon-Frohman/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed May 29, 2024
2 parents 28d3838 + c3bc4ef commit 45af289
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main/java/twilightforest/block/BlockTFCicada.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import net.minecraft.world.Explosion;
import net.minecraft.world.World;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import twilightforest.tileentity.TileEntityTFCicada;

public class BlockTFCicada extends BlockTFCritter {
Expand Down Expand Up @@ -80,16 +78,17 @@ public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer
return false;
}

@SideOnly(Side.CLIENT)
public void stopSinging(World worldIn, int x, int y, int z) {
ChunkCoordinates chunkcoordinates = new ChunkCoordinates(x, y, z);
Minecraft mc = Minecraft.getMinecraft();
ISound isound = (ISound) mc.renderGlobal.mapSoundPositions.get(chunkcoordinates);
if (worldIn.isRemote) {
ChunkCoordinates chunkcoordinates = new ChunkCoordinates(x, y, z);
Minecraft mc = Minecraft.getMinecraft();
ISound isound = (ISound) mc.renderGlobal.mapSoundPositions.get(chunkcoordinates);

while (isound != null) {
mc.getSoundHandler().stopSound(isound);
mc.renderGlobal.mapSoundPositions.remove(chunkcoordinates);
isound = (ISound) mc.renderGlobal.mapSoundPositions.get(chunkcoordinates);
while (isound != null) {
mc.getSoundHandler().stopSound(isound);
mc.renderGlobal.mapSoundPositions.remove(chunkcoordinates);
isound = (ISound) mc.renderGlobal.mapSoundPositions.get(chunkcoordinates);
}
}
}

Expand Down

0 comments on commit 45af289

Please sign in to comment.