Spawning a chest at a specific location and setting its loot table

Started by SyntaxError on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Spawning a chest at a specific location and setting its loot table

I have the spawning function down, the spawning of the chest isn't going so well though...

I've tried spawning it with the dedicated code block, I've tried a command, and I've tried the other merge one too, but I cant get it lol.

Does anyone have a method for this?

 

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I was going to try and…
Mon, 07/14/2025 - 22:41

I was going to try and answer this, but ran into an issue as well! Loot tables can be set on chests by setting the "LootTable" NBT value to a valid loot table registry name.
For example {LootTable:"minecraft:chests/buried_treasure"}

I was testing it to confirm before I replied but as it turns out, the chests I placed using MCreator procedures acted as if they had already been opened; they are unable to hold 'LootTable' values and already have an 'Items[]' array generated.

I've never seen it before. Bug or intended feature? No idea.
Maybe a dev can help