mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Update ItemHandlerHelper.giveItemToPlayer to allow player who picked up the item to hear the sound as well (#4720)
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user