Only play pickup sound for actual players (drying rack, oreberries, etc) #1315

This commit is contained in:
Bernhard Bonigl committed 2015-02-22 17:52:22 +01:00
1 parent 67c05a962b
commit f634389c9f
1 file changed
+3 -2
@@ -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();
}
}
}