Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can it handle structure files? #1

Open
vico93 opened this issue Jan 28, 2023 · 3 comments
Open

Can it handle structure files? #1

vico93 opened this issue Jan 28, 2023 · 3 comments

Comments

@vico93
Copy link

vico93 commented Jan 28, 2023

Not .schematic, but the .nbt files generated by Structure Blocks and used by vanilla Minecraft.

@MikuAuahDark
Copy link
Owner

Looking at the spec, since there are no changes to it as far as I know, it should able to.

Note that if it's compressed, you must decompress it yourself. This library only deals with raw NBT data, not the compressed ones.

@vico93
Copy link
Author

vico93 commented Jan 30, 2023

Well, i tried to plug the library on CraftOS and tried to parse a uncompressed structure file. It returned something like this:

TAG_Compound(""): 7 entries
{
  TAG_List("size"): 3 entries
  {
    TAG_Int(None): 6
    TAG_Int(None): 9
    TAG_Int(None): 5
  }
  TAG_List("entities"): 0 entries
  {

  }

...

I'm really a newbie about this, i just want to "convert" the structure into an 3d array to allow my turtle to build that (each block type assigned to a slot). I dunno if its the right way...

@MikuAuahDark
Copy link
Owner

The first one looks correct to me. Minecraft always uses empty named TAG_Compound at the beginning on all of their NBTs.

Since structure block NBT format looks like undocumented, I can't say much. You probably need to look on the other fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants