Closed NiLSPACE closed 1 year ago
Great job, this looks really nice. There's just two minor things:
piecenr
param just rubs me wrong. I'd have gone for index
, idx
, pieceIdx
...I'll move the documentation to Info.lua
and rename piecenr
👍. I also noticed code from #153 is in here. Did you see my response from that PR?
This is outside the scope of this PR, but I was wondering if it's possible to provide the cIniFile
object of the world.ini
file to the LuaState that reads the cubeset files. That way certain settings could be handled inside the world.ini instead of being fixed for every world.
Oh, I didn't even notice that I was mixing them. I've removed them from this PR now, but I did notice there are other places where they are still used. I've created an issue for that: #155
This makes it possible to save your clipboard to the Cubeset format so Cuberite's SinglePieceStructures generator can use it to generate custom structures. By default the
//schematic save
command still uses the mcedit (.schematic) format.Saving
In order to save with the Cubeset format you have to specify that in the command:
If you want to override certain settings, like the biomes in which the structure should generate or the size of the grid used to spread out the structure then it's possible to add those options at the end of the command.
Certain settings are piece specific in the Cubeset format, like how the piece should be placed on the ground. This can be specified by prefixing the setting with
piece.
. This would look like this:It's also possible to load structures with multiple pieces like the netherfortress prefabs.
Loading
Loading a cubeset file is the same as the mcedit format. The plugin automatically finds the requested file (though it doesn't notice yet if there are two files with the same name but different extensions). If there are multiple pieces in a cubeset file, for example if you load the NetherFortress cubeset file, then it's possible to specify which piece you want by adding
piecenr=<the piece you want>
Using in the world generator
After saving your clipboard to a cubeset file it's possible to load it in the world generator. This is done by copying the file from the
schematics
folder intoPrefabs/SinglePieceStructures
and then enabling it in your world's world.ini file. This is done by addingSinglePieceStructures: <CubesetFilename>
into your world.ini's Finishers list.