Started by
Hijitori
on
Topic category: Help with Minecraft modding (Java Edition)
Is there any way to set a sound which plays when you pick the item? Or just the sounds plays when player gets this item into the inventory. Any procedure for that?
Edited by Hijitori on Sun, 11/22/2020 - 18:47
On the procedure in event trigger add a "when player picks up item" in the additional trigger on the procedure, then add a block called play sound... and your sound
Also remember to put this procedure on the block/item tick.
Another thing you can do (that I don't personally know if it will work) is on the item/block triggers click add new procedure on the section: "when item in inventory tick" and put the play sound block and your sound. Hope it helps you!
Yes indeed I didn't see the "pickup item" condition because it was on Event Trigger and I didn't check it.
It is called "Entity picks up item" and I also had to add "If "Is Current Entity type of EntityPlayer" and then "Play sound", because when there was no "it must be a player" then constantly some entities picked up items and this sound played like every tick. Thanks!
However even though the procedure is on item's tick I want to play the sound when picked up, the sound plays when you pick any item. Any idea to fix this? Maybe item tag is needed to be specified here or smt?
Another idea is to make the sound play when player has it in inventory. To not make it sound constantly try with the repeat blocks. Hope it helps!