Voxelers/mcthings

Explore Structure Block as an Schematic alternative

acs opened this issue · 14 comments

acs commented

https://www.spigotmc.org/threads/sponge-schematics-vs-structures.335314/

Structures must be at maximum 32x32x32 blocks (width x height x length). This is a restriction of Minecraft's structure block format

https://minecraft.gamepedia.com/Structure_Block

https://mcreator.net/forum/53290/it-possible-rotate-schematic-when-placing-it
Lunatrius/Schematica#282

Is it possible with a vanilla minecraft to import structure blocks? Are structure blocks as richer as schematics?

acs commented

https://minecraft.gamepedia.com/Structure_Block

The structures can be mirrored or rotated when they are pasted! We need to explore it carefully because probably we should support for this format!

https://minecraft.gamepedia.com/Structure_block_file_format

acs commented

The rotation for Structure Block is:

Rotation (0, 90, 180, 270)
Sets the rotation of the structure to 0° (no rotation), 90° clockwise, 180° clockwise, and 270° clockwise (or 90° counter-clockwise).

acs commented

https://www.paperpickaxe.com/learn Schematics, and Structure blocks to share regions of minecraft

acs commented

The conversion between both formats is problematic: https://www.minecraftforge.net/forum/topic/61052-1121-schematic-files-versus-nbt-for-structures-and-ways-to-convert/

MCreator seems to be the most update tool for this kind of things.

acs commented

I can not find a website with people sharing structure blocks creations.

Maybe #63? Yes: https://www.nbt-data.com/creation?id=12

acs commented

The block is available in 1.12.2 as expected

Screenshot from 2020-06-07 14-36-56

acs commented

And it seems we can select a region to do things with it!

Screenshot from 2020-06-07 14-39-20

acs commented

Ok, let's try to capture a region and save it, and load it. Let's follow:

https://www.paperpickaxe.com/learn

Screenshot from 2020-06-09 00-07-07
Screenshot from 2020-06-09 00-06-12
Screenshot from 2020-06-09 00-06-00

[structures]$ ls -l
total 4
-rw-rw-r--. 1 adelcastillo adelcastillo 196 Jun  9 00:02 gold.nbt

The save has worked. Let's try now to load it.

Screenshot from 2020-06-09 00-13-17

it works!

acs commented

So then process is:

  • Mark a corner with a structure block of type corner and name it
  • Mark the opposite corner putting a structure block and using detect or using the coordinates fields and use the same name than before for the block
  • Press SAVE (no Save)
  • Add another structure block and select Load type, then define the same name and press LOAD. You need to repeat this step to confirm the loading of the block.
acs commented

I find it very tricky to define the corners of the selection. It seems that the best approach is to add a corner, then add a save block and play with the coordinates inside the save dialog.

acs commented

In any case, the saved data is in NBT format, so we can support it. And if we save it in this format, we can load it from Minecraft directly. But in McThings, the idea is to control from Python the loading of the Things in the Scene, so the process will be to load the NBT data from the Structure Block and then draw it from Python code, not inside Minecraft. So for us, the benefits of saving and loading inside Minecraft are not valuable.

As a conclusion, if there are large libraries of NBT structure blocks, we can add the support to McThings in order to add them to the scenes.

Wait a minute, the possibility of storing the scenes in this structure NBT data is interesting so creators can share their creations with others. This could be specially useful for Things (a Scene normally will need more than 32x32x32 blocks, so it is not possible to share it using this NBT data).

So an interesting goal is to support the saving of Things in this NBT format. Let's think about it.

acs commented

This video shows all the possibilities with detail:

https://www.youtube.com/watch?v=543WnTIThGc

Once you know the basics, it can be followed.

acs commented

As a conclusion, it could be interesting to save a Thing in Structure Block format so it can be easily reused. But an isolate Thing is not a big deal in McThings, where the combination of Things is the key.

And the process of loading the saved blocks and placing them in the correct position without using McThings is pretty tricky. And if McThings is used to create the Scene, why do it from this blocks version of the Thing?

So for me, the value added of this support is not clear, so I won't beat for it now.

We can continue using Schematics.