Started by
Ziadod
on
Topic category: Help with Minecraft modding (Java Edition)
So I have been 5 hours trying to figure out how to get a random slot in the player's inventory each time he breaks a block and apply the sharpness I enchantment on that randomly chosen slot if it has an item and not empty. It just won't work; no errors, but it won't work.
Can anyone tell me what is wrong with my code and how to fix it? Here is my code:
so, in mcreator when you set an item to a variable, it actually copies it.
so you're not modifying the item by modifying the variable,
try using this block at the end,