Why do my chest with loot table is empty?

Started by MariuszKopytko on

Topic category: Help with MCreator software

Active 1 year ago
Joined Oct 2023
Points:
121

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Why do my chest with loot table is empty?

I used command: /give Dev chest{BlockEntityTag:{LootTable:"(modname):chests/(loottable name)"}} and command block with this command: /setblock ~ ~1 ~ minecraft :chest{LootTable:"(modname):chests/(loot table name)"} and the chest is always empty. When I use the first one then chest shows up in my hand and when I'm trying to place it down, it shows up on ground for 0.1 second and disappears (but not from my hand). Then when I'm placing it again it's empty.

Active 1 week ago
Joined May 2022
Points:
1182

User statistics:

  • Modifications: 14
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1141
This is the correct code to…
Sun, 10/01/2023 - 14:16

This is the correct code to run, and it works on my end. Double check that the loot table appears as an available option in the command interface, (if it doesn't, there's an error in the loot table itself that's preventing it from loading). If it does appear in the interface, then there's something wrong with the command or the loot table name.

Active 1 week ago
Joined May 2022
Points:
1182

User statistics:

  • Modifications: 14
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1141
/setblock ~ ~1 ~ chest…
Sun, 10/01/2023 - 14:20
/setblock ~ ~1 ~ chest{LootTable:"superiorstructures:chests/temple_kitchen"} destroy

This is the command I use for this. (superiorstructures is my ModID, and chests/temple_kitchen is the loot table.) It looks like you might be using an older version of the command, try something like this in a command block instead. 

(Also, helpful sidenote, if you use control+block select, you can add a chest with a loot table to your hotbar, which is very, very useful for structure design. You can also use this to save other NBT data and blockstates.)