Skip to content

Commit

Permalink
Only play pickup sound for actual players (drying rack, oreberries, e…
Browse files Browse the repository at this point in the history
…tc) #1315
  • Loading branch information
bonii-xx committed Feb 22, 2015
1 parent 67c05a9 commit f634389
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/tconstruct/library/tools/AbilityHelper.java
Expand Up @@ -627,9 +627,10 @@ public static void spawnItemAtPlayer (EntityPlayer player, ItemStack stack)
}
// 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();
}
}
}

Expand Down

0 comments on commit f634389

Please sign in to comment.