How to make procedure who spawn drop item from loot table

Started by KnightKing777 on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 week ago
Joined Aug 2022
Points:
354

User statistics:

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

Active 2 weeks ago
Joined May 2022
Points:
1123

User statistics:

  • Modifications: 14
  • Forum topics: 23
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1140
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.