Started by
Saiber Rida
on
Topic category: Help with Minecraft modding (Java Edition)
I wanted to know how to link a loot table with a custom structure, since I can't find a way to do so
EDIT: Nevermind, I found out the way to do so.
Edited by Saiber Rida on Sun, 02/02/2020 - 23:17
Could you post your solution here pls? ;) I am still trying to link a custom loot table to a chest. MC 1.12.2
Basically when you create a loot table for a chest, even if the structure doesn't use it, it still exist, so you just have to place a chest using that loot table with /setblock, since when you do it that way, the loot isn't generated yet.
Basically, make a structure and put in it chests with /setblock that use the loot table, then save the structure and ta-da!
You can change the orientation of the chest by adding [facing=north/east/south/west] after the "minecraft:chest" part
Thank you so much for sharing the solution
I am already using
/setblock ~ ~ ~ minecraft:chest 2 replace {LootTable:"dungeonmod:testloot"}
But this just spawns a empty chest. My loot table name and modregistry name are 100% correct. Which command are you using?
In my case:
Loot table registry name:: chests/magical_tower2
Loot table namespace: mod
Loot table type: Chest
The command:
/setblock ~ ~1 ~ minecraft:chest{LootTable:"quantimate:chests/magical_tower2"}
quantimate is the name of the mod, so just replace that part with the name of your mod, tho, this is for 1.14.4, no idea about 1.12.2, but everything should work the same way (excluding the command ofc, since the Update Aquatic changed the commands)
Still thanks but yeah, I guess I have to give up. its not working. I would also had to as a number to the command.
/setblock ~ ~1 ~ minecraft:chest 1 {LootTable:"testmod:chests/testloot"}
otherwhise when I do
/setblock ~ ~1 ~ minecraft:chest {LootTable:"test:chests/testloot"}
then it says "{LootTable:"testmod:chests/testloot"}" is not a state for block minecraft:chest
This isn't working for me, all I'm getting is an empty chest. Then again, I'm in 1.15, but even then the syntax didn't change as far as I'm aware.