Loot tables cannot be applied to blocks with Custom Inventories

Published by WenXin2 on Sun, 05/03/2020 - 22:43
Works as designed
Issue description

Currently, dungeon loot tables cannot be applied to custom blocks with custom inventories attached.

For example, if I use the command below and apply it to a chest, I can open the chest to find dungeon loot. But if I run the same command on a custom block with an inventory, it will not have any loot inside. This would make custom structures that contains custom chests with loot possible.

Attached is my workspace, the revelant elements are named CrateGUI and AzureCrate.

/data merge block ~ ~-2 ~ {LootTable:"chests/simple_dungeon"}

Attachment Size
natureplus-1.15.2-1.4_1.zip399.55 KB 399.55 KB

Issue comments

You are welcome! I am glad I could help :) If you like what we do, consider donating to us to help us keep this project up.

I'm not sure if I'm doing something wrong, but with b20316 when I ran the command for the Loot Table, its not being applied to the block with the inventory.

I tested and it worked. But I had to specify absolute coordinates, or offset myself properly above the chest to apply. Same happened with vanilla chests.


          "name": "natureplus:azure_crate

One of your loot tables has broken JSON and it has locked code so I guess it's a typo when you were editing it.

Thanks! I got it working. Turns out, it was simply because the code for the crate was locked when I added waterlogging to it.

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.