Started by
TherapueticLiz
on
Topic category: Help with Minecraft modding (Java Edition)
Maybe i'm explaining it too poorly in the title, but im trying to make it so that *Ore-A drops *Gem-A but also has a chance to drop *Powder-A
How would I configure that in procedure format? Cause the result I have is that all blocks have a percentage chance to drop it.
Mod is currently for 1.12.2
Edited by TherapueticLiz on Mon, 09/07/2020 - 08:35
You might could use a loot table, but I'm not positive. If you go into the block's settings, and to procedures, there's probably an area that says "when block is broken," which would only happen if that particular block breaks. You can say "if random is less than or equal to (specified number) spawn gem (specified item)" For example, "if random number is less than or equal to .25, drop block/ else if random number is less than or equal to .5, drop block and spawn gem" Sorry I'm bad at explaining.
Use that procedure, but instead of making it a global trigger, put it in the "When block broken" trigger in your custom block.
Remove the while statement. It'll cause an infinite loop/your game will crash because while statements fire every millisecond and pause all other actions until their condition is false.
Other than that, the "if Random(0, 1) < 0.25" statement is the correct way to do this.
Everything is explained Here
https://www.youtube.com/watch?v=wh7Rv0O_pFA