Restructured

Restructured

20.6k Downloads

Support for Chisels and Bits

Thiana opened this issue ยท 7 comments

commented

Would it be possible to add support for using Chisels and Bits 'microblocks' in structures? The author AlgorithmX2 is willing to add support that would allow it but says that it will involve some work on your side. The thread discussing it is available here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2576750-chisels-bits-flat-colored-blocks?comment=107

Thanks.

commented

This would require some sort of standard for the schematic file that includes such things. As @AlgorithmX2 points out the format will require work to make this happen. Also, mods/plugins such as WorldEdit would have to be modified to capture and store that information to be useful.

commented

I'm not sure it would require a standard format, but certainly require some way to request "cross-world" NBT from a tile entity... of course not everything would support such things, but mods could opt-in to support it via an interface or something.

commented

Standard in so far that the mod/plugin creating the schematic file is aware and captures the state, and of course any mod loading them would be aware to reconstruct the state. For this to work that should be some sort of contract. The schematic file would have to have an enhanced block dictionary to decouple the structure layout data from the world block IDs, and of course the extra per schematic structure cell NBT, if any.

EDIT: Don't think this would be an issue, but the blocks and data would have to be capable of rotation using the standard routines. At that point it is up to the authors of the those particular blocks to handle rotation.

commented

Seems to me that would already be the case? The individual mods providing NBT data need not be aware of the mod storing them, or that mods format - since they would simply have their own format.

The mod storing the data would of course have its own format for saving, or loading... or possibly use a format of another mod for cross-compat, but that would be option.

commented

The NBT part would be easy - as you point out there should be mod support for that. The main issue to be dealt with is block ID handling. And that is what requires some work in the schematic format. I already have an idea of how that could be accomplished - but it would require schematic mods to store the appropriate data.

commented

I believe Schematica already accomplishes this. It creates a cross reference map for block ids and stores it in the schematic file.

Then you reference the map when "pasting" the schematic

I use it in my mod to resolve world to world ID issues. Not sure why worldedit hasnt updated their schematic saving method yet.

https://github.com/gummby8/ModularBosses/blob/master/main/java/com/Splosions/ModularBosses/util/Schematic.java

Schematicas git
https://github.com/Lunatrius/Schematica/tree/master/src

commented

WorldEdit is still legacy code that uses int IDs, it doesn't really know about string IDs. We'll probably update when we rewrite the API.