Querz / NBT

A java implementation of the NBT protocol, including a way to implement custom tags.
MIT License
182 stars 48 forks source link

Limited height on write region file #56

Open MorningStar3600 opened 3 years ago

MorningStar3600 commented 3 years ago

When we (a friend of mine and me) are working on project (using your library). We need to write blocs in a mcafile, using the 'setBlockStateAt' function. But, when the second argument (y) go above 17, there is an error :

-> Exception in thread "main" java.lang.NullPointerException: Cannot invoke "net.querz.nbt.tag.ListTag.size()" because "this.palette" is null at net.querz.mca.Section.setBlockStateAt(Section.java:132) at net.querz.mca.Chunk.setBlockStateAt(Chunk.java:313) at net.querz.mca.MCAFile.setBlockStateAt(MCAFile.java:265) at magicbox.Test.main(Test.java:31)

There is the code involved : image

Is this an error, or is there something we're doing wrong ?

Anyway, this library is game-changing, thanks a lot !