Started by
Modman5
on
Topic category: Help with Minecraft modding (Java Edition)
So i am currently making a casino mod for 1.10 and i made an item "Lottery ticket". how do i make it so when i right click it rolls a random number between 1 and 50 and if that numver is 15 it gives the player who right clicked 10 diamond blocks? or is that impossible by mcreator standards??? i did see a tag for "when item is right-clicked in air" and it said execute variable but when ever i click that it says "no variables detected"?
For random number : (int)(Math.random() * 50)
For detecting the value if(YOUR_VARIABLE == 15)
thanks (insert smily face here)
also which category do i add these to...custom code???
In case use mcreator's eventy system you can simply use something like "add item to inventory" and use as a condition (int)(Math.random() * 50) == 15