Refactor in preparation for supporting POI and ENTITIES MCA files#68
Open
ens-gijs wants to merge 336 commits intoQuerz:masterfrom
Open
Refactor in preparation for supporting POI and ENTITIES MCA files#68ens-gijs wants to merge 336 commits intoQuerz:masterfrom
ens-gijs wants to merge 336 commits intoQuerz:masterfrom
Conversation
|
Any updates on this? |
…e/deserialize/manipulation
…lists so it is parseable by the SNBT parser - and it just looks better too.
…to write SNBT to a text file.
…nbt view of the chunk data it has been given, and adding the TESTDBG path to .gitignore
…ntPointXYZ to its API, enhanced iterator to support filtered iteration
… detect palette corruption due to modification by the user provided filter. PalettizedCuboid::set - added overloads for filling a volume.
…dCuboid to get a better look at code coverage and filled gaps. Reworked PalettizedCuboid.CursorIterator to always yield values by reference and to make a best-effort to detect palette corruption and detect palette modification made outside the iterator and throw ConcurrentModificationException. Updated all PalettizedCuboid functions that take a Predicate and pass palette data (countIf, replaceIf) to check for concurrent modification and palette corruption. Added minimumBitsPerIndex to PalettizedCuboid toCompoundTag and logic to make a good guess at what the value should be if one isn't provided (biome_states always use 4 bits per index - probably as a runtime optimization to avoid constantly resizing the palette).
…dCuboid to get a better look at code coverage and filled gaps. Reworked PalettizedCuboid.CursorIterator to always yield values by reference and to make a best-effort to detect palette corruption and detect palette modification made outside the iterator and throw ConcurrentModificationException. Updated all PalettizedCuboid functions that take a Predicate and pass palette data (countIf, replaceIf) to check for concurrent modification and palette corruption. Added minimumBitsPerIndex to PalettizedCuboid toCompoundTag and logic to make a good guess at what the value should be if one isn't provided (biome_states always use 4 bits per index - probably as a runtime optimization to avoid constantly resizing the palette). I think that wraps up PalettizedCuboid except for support for version LT JAVA_1_16_20W17A.
…dCuboid to get a better look at code coverage and filled gaps. Reworked PalettizedCuboid.CursorIterator to always yield values by reference and to make a best-effort to detect palette corruption and detect palette modification made outside the iterator and throw ConcurrentModificationException. Updated all PalettizedCuboid functions that take a Predicate and pass palette data (countIf, replaceIf) to check for concurrent modification and palette corruption. Added minimumBitsPerIndex to PalettizedCuboid toCompoundTag and logic to make a good guess at what the value should be if one isn't provided (biome_states always use 4 bits per index - probably as a runtime optimization to avoid constantly resizing the palette). I think that wraps up PalettizedCuboid except for support for version LT JAVA_1_16_20W17A. fixed a couple javadoc syntax errors
…inline - time to rename things so they make more sense and generally are closer to how I like it! Renamed namespace to avoid dependency conflicts in future consumers. Also sneaking in a couple minor changes made along the way.
Update readme to re-add fork not ready for use warning,comment out package status badges for now, and update repo info to point to this github repo.
Took a polishing pass over binary and text nbt helper utility functions - added more overloads and organized things. Made TextNbtParser implement NbtInput and therefore support NamedTag's.
…MCA region (terrain) now nearly all passing - just have to cover non-vanilla tags (aka paper) and figure out what's up with a wrong chunk section Y for a sample 1.20.4 subchunk. Other changes - block and biome stuff reworked (mostly removed / commented-out support for getting block and biome info for current data versions - will re-add later) - Added DataVersion .next() and .previous() - Added VersionLacksSupportException class and made use of it - Made "sort compound tags by key" the default behavior for TextNbtHelpers toText* operations - Added *Unsorted variants for TextNbtHelpers operations - Added TextNbtParser::parseInline to make defining defaults in code easier than building a full tag part by part - TextNbtSerializer now takes sortCompoundTagEntries in its constructor
…ys will now be ordered by insertion order (the order they were read in).
…ontaining less than 2 bytes of data. made every write method in BinaryNbtHelpers return Path
…essionType param - they compute which CompressionType to use.
…NBT without full object overhead. Thi solution is solidly 5-6x faster than deserializing to Tag objects, sort and write to bin nbt
… BinaryNbtTagSorter
…h and improvements.
…s, lists, compound) to be placed on one-line to save a lot of vertical space in the result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Love your library! I hope you can incorporate this large refactor which expands the mca API to improve ease of use and is a prerequisite for adding support for the new(ish) POI and ENTITES mca files. Also as I've started looking into the chunk data changes for 1.18... they look to be heading toward somewhat extensive and I'm willing to take on making the changes needed to support 1.18, but I'll be building in that support on top of my fork.
Let me know if you want to chat more, etc. Please perform your own integration testing as well as my changes add some fail-fast check to keep consumers from shooting themselves in the foot.