Started by
matsieboy2005
on
Topic category: Help with Minecraft modding (Java Edition)
So i want to make a item that when i rightclick on a block the block changes and the item gets removed form my inventory. Can someone please help me with this? thanks :)
Edited by matsieboy2005 on Mon, 04/20/2020 - 10:31
Yeah, that's very easy; I now do not have my PC to send you, how it should look like, but I will try to explain with words; you even do not need any code, just use "create procedure";
The trigger should be "if player right clicks on block"
Inside you should test for the item, using "item in main hand of provided entity";
Also then set the item in slot of main hand decreased by one;
And finally, set the block to whatever you want using "set block on x y z";
Block, it's xyz and the player who right clicked will come together with the dependencies, so you don't need any special functions for this;
Hope this helps