Update ItemHandlerHelper.giveItemToPlayer to allow player who picked up the item to hear the sound as well (#4720)

This commit is contained in:
Parker Young authored and LexManos committed 2018-04-01 00:43:39 -07:00
1 parent 6f642ba6ce
commit db3b2549e2
2 files changed
+42 -1

No files matched your search

@@ -181,7 +181,7 @@ public class ItemHandlerHelper
// play sound if something got picked up
if (remainder.isEmpty() || remainder.getCount() != stack.getCount())
{
world.playSound(player, player.posX, player.posY, player.posZ,
world.playSound(null, player.posX, player.posY + 0.5, player.posZ,
SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}