How do I Assign a Loot Table to a Structure

Started by LittenKitten on

Topic category: Help with MCreator software

Last seen on 00:34, 21. Nov 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I Assign a Loot Table to a Structure

I created a loot table that I want to spawn in the chests inside a structure I made. I can't find a way to have it spawn in those chests. How do I do it?

Last seen on 19:59, 3. Oct 2023
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What ur gonna need to do. is…
Fri, 10/23/2020 - 21:28

What ur gonna need to do. is give yourself a chest with the loot table tag. This will vary somewhat but the general format is this:
/give @p chest{BlockEntityTag:{LootTable:"[MOD]:[TABLENAME]"}

To dissect this you will put your mods id name (The one with no spaces or caps) into [MOD] and whatever your loot tables name is (Should be the top bar of the loot table's edit screen) into [TABLENAME]. This will vary based on settings though. If you set the type of loot table to Minecraft instead of mod, you'll put Minecraft into [MOD], and if the category is Chest, you'll put Minecraft/Chest or something like that. Just fiddle with the command a bit and you should get it. If you get it right, any chest you put down will have the loot table assigned to it

WHEN YOU GET IT RIGHT: You'll put a loot chest wherever you want it, BUT DONT OPEN THE CHEST!!! If you do it will generate the loot and will not be random anymore. Save the structure and when it generates the loot will generate based on the loot table you defined
 

You can even edit the loot table's contents without re-saving the structure! :D