Giter VIP home page Giter VIP logo

Comments (4)

SmylerMC avatar SmylerMC commented on August 22, 2024

I can confirm that this change also breaks schematic created with Litemapy for Litematica (see the Github mention above). Decompressing the file, adding a trailing null byte and re-compressing it works and allows the file to load both in game with Litematica and in NBTExplorer.

from nbtlib.

vberlier avatar vberlier commented on August 22, 2024

Oh right I didn't think about that, I was kind of in a rush sorry. I'm gonna try to go over all this in a few days. In the meantime I think the 2.x releases should be considered experimental and unstable.

from nbtlib.

ch-yx avatar ch-yx commented on August 22, 2024

I'd like to understand why File had this setting in the first place

because mojang write that...
the file is some thing like that iirc:

tagtypeid lenofname name data
and no end tag after "data"
just like a len=1 compound without end. eg:
{"":data

that is why the File class set end_tag = b""

from nbtlib.

MestreLion avatar MestreLion commented on August 22, 2024

I'd like to understand why File had this setting in the first place

because mojang write that... the file is some thing like that iirc:

tagtypeid lenofname name data and no end tag after "data" just like a len=1 compound without end. eg: {"":data

that is why the File class set end_tag = b""

That is not accurate, at least not for recent versions of Minecraft: level.dat, all map_*.dat files including idcounts.dat, and also chunk data, they all have a trailing NUL byte. NBT Explorer does not even show the file if it doesn't have the trailing byte, so likely Mojang does so from a long time.

from nbtlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.