How to make procedure who spawn drop item from loot table

Started by KnightKing777 on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 weeks ago
Joined Aug 2022
Points:
501

User statistics:

  • Modifications: 2
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 37
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 1 day ago
Joined May 2022
Points:
1254

User statistics:

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