Started by
VioletPyre
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, i'm making some boss mobs and I was trying to make them loot something with a 5% chance of doing so.
But I do not know how to do such a thing (I'm on 1.12.2) If anyone got an anwser ,i'd be really thankful to see it, thanks.
this may be hard to understand, use the "If... then... else..." procedure. Next, use the "greator than or eaqual to" procedure block. Last use the random (0,1] and the number block.
i'm sorry for the complex context clues and contents, it may be completely out of context.
but if it helps: reply to me.
and also connect the number block with the the set up like this:
if:[random (0,1]] > [0.5]
then: spawn gen [primary boss item]
else: spawn [secondary boss item]
the repeater block generates more items, don't use the infinite one, it will crash the client.
Ok thank you, and whoa, didn't expect an anwser that quick ! I will try and let a post if it does not work ;)
Ok, after some "messing around" I was not able to find a "If....then...else." block. I found the "if...Do....Else.." and "If...do...esle if..do.."
Do I pick the "If do else" block ?
Nevermind, It works thanks a lot and I'm wondering, how do i know the percentage i put ? example if i want to put 25% chance , for example, is it like [random (0,1] > [2.5] ?
yes. make sure it's 0.25.
well you opened me a lot of possibilities, so i'm really thankful.
the thing is, 0.5 seems to be 50%. i tested out , i killed 20 bosses and got 9 of one item and 11 of the other.
you can also reverse the chance of the boss drops by flipping the symbol.
no problem, if there's anything you need at my level, call me.
Okay, cya ;)