From 6ddc9f307918a66671aa307635bfce8f15b546d3 Mon Sep 17 00:00:00 2001 From: The-Fireplace Date: Sun, 12 Jun 2016 16:09:31 -0500 Subject: [PATCH] Fixed chests playing the open sound when they close (#1316) --- .../java/forestry/core/tiles/TileNaturalistChest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/forestry/core/tiles/TileNaturalistChest.java b/src/main/java/forestry/core/tiles/TileNaturalistChest.java index 33d3f5c33..1fc0e6b06 100644 --- a/src/main/java/forestry/core/tiles/TileNaturalistChest.java +++ b/src/main/java/forestry/core/tiles/TileNaturalistChest.java @@ -68,7 +68,7 @@ public abstract class TileNaturalistChest extends TileBase implements IPagedInve prevLidAngle = lidAngle; if (numPlayersUsing > 0 && lidAngle == 0.0F) { - playLidSound("random.chestopen"); + playLidSound(SoundEvents.BLOCK_CHEST_OPEN); } if (numPlayersUsing == 0 && lidAngle > 0.0F || numPlayersUsing > 0 && lidAngle < 1.0F) { @@ -83,13 +83,13 @@ public abstract class TileNaturalistChest extends TileBase implements IPagedInve lidAngle = Math.max(Math.min(lidAngle, 1), 0); if (lidAngle < 0.5F && oldAngle >= 0.5F) { - playLidSound("random.chestclosed"); + playLidSound(SoundEvents.BLOCK_CHEST_CLOSE); } } } - private void playLidSound(String sound) { - this.worldObj.playSound(null, getPos(), SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + private void playLidSound(SoundEvent sound) { + this.worldObj.playSound(null, getPos(), sound, SoundCategory.BLOCKS, 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F); } @Override