Custom Item Drop From Vanilla Mob

Started by Cuddly on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Item Drop From Vanilla Mob

How would i make it so there is like a 10% chance that a modded item drops when u kill a vanilla mob?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think using the loot Table…
Sat, 04/03/2021 - 15:00

I think using the loot Table feature.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
where would i find that?
Tue, 05/25/2021 - 00:42

where would i find that?

No need for loot tables…
Tue, 05/25/2021 - 02:21

No need for loot tables. Simply use a procedure.

Start with the "When entity killed" global trigger. Then, as the condition for an 'if' statement, put "[Random (0,1]] ≤ 0.1]". This creates your 1/10 chance.

Next, add an "AND" block to your 'if' statement. Add your random 1/10 chance to one of its slots. In the other, add the block "is [event/target entity] (sub)type of [ ]" and set the entity to the vanilla entity you want to use.

Within the 'if' statement, add the block "spawn item or gem at x: y: z: pickup delay [ ] despawn [ ]". Replace the item with whatever you want to use.

This should cause the item you want to appear whenever the entity in question dies.