Custom Item Drop From Vanilla Mob

Started by Cuddly on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Mar 2021
Points:
599

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
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?

Active 4 years ago
Joined Apr 2021
Points:
576

User statistics:

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

I think using the loot Table feature.

Active 4 years ago
Joined May 2021
Points:
575

User statistics:

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

where would i find that?

Active 2 days ago
Joined May 2018
Points:
1126

User statistics:

  • Modifications: 8
  • Forum topics: 36
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 366
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.