Posts: 69
Threads: 10
Joined: Aug 2020
Thanks: 1
Given 7 thank(s) in 7 post(s)
I created a child of the prefab class that accepts a new parameter in the constructor which is the loot table.
If the draw into chunk method is called it checks any block placed if it‘s a chest and fills it with the loot specified
I don’t like the way it checks for chests (simple going through every block) maybe if we include a vector of all chests position exported from the structure this could be skipped
Although this could be done within another PR
Oh yeah - I already noticed this and that you sometimes you can‘t achieve vanilla behaviour because it changed during the supported versions
And you spend some time looking for the code that actually does the stuff you look for
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
Nooo, that's the wrong approach again. What is the loot table bound to? Why a child class when that behavior is intended for all prefabs?
The proper way would be to have a list of loot tables in the prefab, each bound to relative coords inside that prefab. So that when there are three chests and a furnace in the prefab, they can each be filled with specific loot.
And as I said, better split this into two tasks, first implement the generator without caring for the loot, then add loot table support to entire Cuberite. There's chests in villages, in the mineshafts and in the nether fortresses that need loot tables, too.
Posts: 69
Threads: 10
Joined: Aug 2020
Thanks: 1
Given 7 thank(s) in 7 post(s)
Ok, now I got what you‘re talking about. Sorry my brain is sometimes slow.
Then I think my code already works - just need to test the Code with prefabs. The loot stuff needs to be reverted
Adding the loot in the cuberite binary should be quite easy since the GalExport plugin is doing the heavy lifting
Posts: 69
Threads: 10
Joined: Aug 2020
Thanks: 1
Given 7 thank(s) in 7 post(s)
Yes - the settings are from the cubeset file. Just wanted to see it work.
All the code is more or less taken from other places (mostly the PieceGenerator)
How do I assign the metadata for the group in the export plugin? is there any documentation on the options avaiable in the metadata?
Posts: 69
Threads: 10
Joined: Aug 2020
Thanks: 1
Given 7 thank(s) in 7 post(s)
i tried all comannds documented but didn't find any - well webinterface works for me
the code is a good start thank you
ok - time to use grep on the stringmap and check when it's actually used
Gonna post the results here
Posts: 69
Threads: 10
Joined: Aug 2020
Thanks: 1
Given 7 thank(s) in 7 post(s)
Ok I had some time to look into it but there doesn't seem to be a "Group" menu to be displayed
I used the default config and the lastest version of the plugin and the Galery server backup. Didn't find any other error in the log related to the galery export plugin.