Old region files crash
I'm trying to use your library to read some old region files and the next error is being thrown.
java.lang.ClassCastException: Cannot cast net.querz.nbt.tag.LongArrayTag to net.querz.nbt.tag.ListTag at java.lang.Class.cast(Class.java:3369) ~[?:1.8.0_161] at net.querz.nbt.tag.CompoundTag.get(CompoundTag.java:74) ~[?:?] at net.querz.nbt.tag.CompoundTag.getListTag(CompoundTag.java:124) ~[?:?] at net.querz.mca.Chunk.initReferences(Chunk.java:79) ~[?:?] at net.querz.mca.Chunk.deserialize(Chunk.java:178) ~[?:?] at net.querz.mca.MCAFile.deserialize(MCAFile.java:61) ~[?:?] at net.querz.mca.MCAUtil.read(MCAUtil.java:60) ~[?:?] at net.querz.mca.MCAUtil.read(MCAUtil.java:26) ~[?:?]
It is caused by Entities being an array of bytes in versions prior 1.10 (as can be seen in https://minecraft.gamepedia.com/Chunk_format). Fixing this might lead to other errors since other fields were arrays in older versions (TileEntities, TileTicks and LiquidTicks). Is there any way to read it? My intention is to update those fields to the new format since using forceUpgrade didn't work, so only adding a way to load the chunk with the current data structure would be fine. If that can't be done, just loading everything but those values is fine for me since I don't need them for anything.
HeightMap might also cause problems.
This happens when a world has been updated using forceUpgrade. For some reason Minecraft converts Entities, TileEntities and some other lists into a LongArrayTag when a chunk hasn't been fully generated. I'm working on a fix for that.
This library only supports the "new" block format used in 1.13 and above. From what version do you intend to update your world?
Experiencing the same issue, except for some reason it's happening on a more modern version of Minecraft. The world originally started on 1.8 and was gradually updated to 1.15.2.
Exception in thread "main" java.lang.ClassCastException: Cannot cast net.querz.nbt.tag.ByteArrayTag to net.querz.nbt.tag.IntArrayTag
at java.lang.Class.cast(Unknown Source)
at net.querz.nbt.tag.CompoundTag.get(CompoundTag.java:74)
at net.querz.nbt.tag.CompoundTag.getIntArrayTag(CompoundTag.java:116)
at net.querz.nbt.tag.CompoundTag.getIntArray(CompoundTag.java:177)
at net.querz.mca.Chunk.initReferences(Chunk.java:70)
at net.querz.mca.Chunk.deserialize(Chunk.java:178)
at net.querz.mca.MCAFile.deserialize(MCAFile.java:61)
at net.querz.mca.MCAUtil.read(MCAUtil.java:60)
at net.querz.mca.MCAUtil.read(MCAUtil.java:36)
I'm also experiencing this issue. My world is also originally from 1.8 and was gradually updated to 1.16.4.
@DerTyan Have you solved this problem?
Experiencing the same issue, except for some reason it's happening on a more modern version of Minecraft. The world originally started on 1.8 and was gradually updated to 1.15.2.
Exception in thread "main" java.lang.ClassCastException: Cannot cast net.querz.nbt.tag.ByteArrayTag to net.querz.nbt.tag.IntArrayTag at java.lang.Class.cast(Unknown Source) at net.querz.nbt.tag.CompoundTag.get(CompoundTag.java:74) at net.querz.nbt.tag.CompoundTag.getIntArrayTag(CompoundTag.java:116) at net.querz.nbt.tag.CompoundTag.getIntArray(CompoundTag.java:177) at net.querz.mca.Chunk.initReferences(Chunk.java:70) at net.querz.mca.Chunk.deserialize(Chunk.java:178) at net.querz.mca.MCAFile.deserialize(MCAFile.java:61) at net.querz.mca.MCAUtil.read(MCAUtil.java:60) at net.querz.mca.MCAUtil.read(MCAUtil.java:36)
Or u?
Experiencing the same issue, except for some reason it's happening on a more modern version of Minecraft. The world originally started on 1.8 and was gradually updated to 1.15.2.
Exception in thread "main" java.lang.ClassCastException: Cannot cast net.querz.nbt.tag.ByteArrayTag to net.querz.nbt.tag.IntArrayTag at java.lang.Class.cast(Unknown Source) at net.querz.nbt.tag.CompoundTag.get(CompoundTag.java:74) at net.querz.nbt.tag.CompoundTag.getIntArrayTag(CompoundTag.java:116) at net.querz.nbt.tag.CompoundTag.getIntArray(CompoundTag.java:177) at net.querz.mca.Chunk.initReferences(Chunk.java:70) at net.querz.mca.Chunk.deserialize(Chunk.java:178) at net.querz.mca.MCAFile.deserialize(MCAFile.java:61) at net.querz.mca.MCAUtil.read(MCAUtil.java:60) at net.querz.mca.MCAUtil.read(MCAUtil.java:36)Or u?
Sorry for the late response, but unfortunately I didn't solve the problem. I ended up saying "frick it", and using a completely different programming language instead.