PrismarineJS / prismarine-provider-anvil

Anvil Storage Provider implementation.
13 stars 24 forks source link

Updated writeLevel to use the new nbt builder #46

Closed GroobleDierne closed 3 years ago

GroobleDierne commented 3 years ago

Currently writeLevel() only let you define the RandomSeed field but level.dat aims to contain way more data, you can now add whatever data you want. This PR is a breaking change (for flying-squid for instance) but it avoid introducing breaking changes in the future when there will be a need to add more data.

GroobleDierne commented 3 years ago

By the way, https://github.com/PrismarineJS/prismarine-nbt/pull/48 is missing the implementation of NBTLong and NBTDouble.

u9g commented 3 years ago

By the way, PrismarineJS/prismarine-nbt#48 is missing the implementation of NBTLong and NBTDouble.

its missing a lot yeah, you can add that in this pr if its needed

GroobleDierne commented 3 years ago

Ready IMO

u9g commented 3 years ago

if it doesnt have any data anymore, whats the point in storing this function here, if you create the actual nbt data in user code

GroobleDierne commented 3 years ago

if it doesnt have any data anymore, whats the point in storing this function here, if you create the actual nbt data in user code

I agree, not much of interest other than providing an abstraction layer to compress the data and write the file. It's just a utility function like readLevel so I think it makes sense to keep it.

rom1504 commented 3 years ago

this is breaking and I don't see the benefit, please rethink it if you need the feature