How do I make Custom Ores drop Additional Loot?

Started by TherapueticLiz on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make Custom Ores drop Additional Loot?
Mon, 09/07/2020 - 08:35 (edited)

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.
 

Both Examples do not work.

https://imgur.com/80Pek8y

 

Mod is currently for 1.12.2

Edited by TherapueticLiz on Mon, 09/07/2020 - 08:35
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might could use a loot…
Mon, 09/07/2020 - 14:13

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.

Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use that procedure, but…
Mon, 09/07/2020 - 21:21

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.