Querz / NBT

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

Added support for partial chunk/region load #49

Closed prydin closed 4 years ago

prydin commented 4 years ago

Implemented partial load of chunks and regions as described in #48.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.6%) to 89.906% when pulling 49e613bfb87198fd05722f2b94f89f79a886c73b on prydin:prydin-partial-load into 0755fe59dbd96ad5e9772cb24b0606eb97c3e44a on Querz:master.

Querz commented 4 years ago

Right now when trying to save a chunk that only has been partially loaded it will throw an NPE (see Chunk.java#L600 which is called in Chunk.java#L133). I think it would be better to throw an UnsupportedOperationException with an appropriate message when trying to save a chunk with only partially loaded data.

prydin commented 4 years ago

Thanks! I also realized that I have a lot of OR when it should be AND. I have NO idea what I was thinking. :)

prydin commented 4 years ago

Made a lot of changes:

Fixed all my bugs described above. Added test cases. Fixed typo on Heightmaps in serialization code. Upgraded to gradle 6.5. The older version didn't support modern JDKs. Added check for partial chunk on serialization.

Querz commented 4 years ago
Querz commented 4 years ago
prydin commented 4 years ago

Thanks! Is this ready to be merged now, or are there more changes you'd like?

Querz commented 4 years ago

lgtm