Mob should drop sword to 20%. How does it work?

Started by McDacreatX on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob should drop sword to 20%. How does it work?
Sun, 12/20/2020 - 21:29 (edited)

Hey, I have create a Mob and when you kill him he should drop an item like a sword at a 20% chance.

How I do that, that the drop chance is 20%?

Edited by McDacreatX on Sun, 12/20/2020 - 21:29
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Go to the mob, go to…
Mon, 12/21/2020 - 03:29

Go to the mob, go to triggers, and click the green plus for "when entity dies". Hit create procedure. For the actual procedure you can use on of the templates by going to "procedure templates" on the top left, and select "do with 70% chance". Where it says 0.7, change it to 0.2. Then on the 'do' section section of the procedure block, go to World Management, and use the procedure "Spawn Gem" In the input slot add the word. Hope this helps.