Started by
Luigi999999
on
Topic category: Help with Minecraft modding (Java Edition)
Hello. I would like to create a procedure and I do not know how to do it. I would like to create a block that if you click it with a specific item you get an item selected from a list with a chance (%) set. Then the specific item used to use the block disappears.
Edited by Luigi999999 on Mon, 07/23/2018 - 17:03
look around the forums they have the answers you need, you might just have to pull from several places
Add this procedure to "when block right-clicked" trigger
Now, you can do this in several ways. Here is one of them:
Add a local variable to the procedure;
If (get item in entity main hand = (choose item))
Do:
Remove item from player's inventory
Set variable (local) to (random × 10) PS: you can find random on the π procedure block that is found in the maths tab
If local variable = 1
Add item to inventory (item)
If local variable =2
[...]
Yes, this is one of the rare comments where I use bold and italic
thank you , it helped me a lot :)