how to make a custom batch table with a chest in a custom structure ?

Started by Bakerlol. on

Topic category: Help with modding (Java Edition)

Last seen on 13:01, 18. Sep 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a custom batch table with a chest in a custom structure ?

how to make a custom batch table with a chest in a custom structure ?

Last seen on 20:43, 20. Aug 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You mean a loot table, I…
Sun, 02/04/2024 - 17:35

You mean a loot table, I assume?

You would need to create a custom loot table element in MCreator, and add the items you wish. To put it in a custom structure, you need to obtain a chest with NBT data. You can do this by placing a command block with the following command:

/setblock ~ ~1 ~ chest{LootTable:"superiorstructures:chests/portal_depot_loot"} destroy

...replacing 'superiorstructures' with your mod id, and 'portal_depot_loot' with the name of your loot table. 

Then you can control-middle click the chest to grab it with NBT data in creative mode. (This will essentially give you a chest that will fill itself with your loot table the first time it's opened or interacted with.) You can place this in your structure, and as long as the chest hasn't been interacted with when you save your structure, it will have different loot each time the structure is loaded.