How to make procedure who spawn drop item from loot table

Started by KnightKing777 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make procedure who spawn drop item from loot table

Hi, recently I was thinking about making a key chest that, when opened, throws items from the loot table, but with the procedures I was unable to do it. Any ideas?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could use the 'random…
Sun, 02/04/2024 - 17:38

You could use the 'random item from tag' function, or the 'for each item from loot table' itemstack iterator. It depends on how complex the loot table needs to be- the easiest, (if not nessisarily best) approach might be to just add all the loot table's items to a tag, and then randomly select an item from that tag to spawn.