From f634389c9f051d2c0ea81f35a7110cfd71a43d78 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Sun, 22 Feb 2015 17:52:22 +0100 Subject: [PATCH] Only play pickup sound for actual players (drying rack, oreberries, etc) #1315 --- src/main/java/tconstruct/library/tools/AbilityHelper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/tconstruct/library/tools/AbilityHelper.java b/src/main/java/tconstruct/library/tools/AbilityHelper.java index 09a55bb5..7e3df558 100644 --- a/src/main/java/tconstruct/library/tools/AbilityHelper.java +++ b/src/main/java/tconstruct/library/tools/AbilityHelper.java @@ -627,9 +627,10 @@ public class AbilityHelper } // if it got picked up, we're playing the sound else { - player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((TConstruct.random.nextFloat() - TConstruct.random.nextFloat()) * 0.7F + 1.0F) * 2.0F); - if(player instanceof EntityPlayerMP) + if(player instanceof EntityPlayerMP) { + player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((TConstruct.random.nextFloat() - TConstruct.random.nextFloat()) * 0.7F + 1.0F) * 2.0F); player.inventoryContainer.detectAndSendChanges(); + } } }