-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor in preparation for supporting POI and ENTITIES MCA files #68
Open
ens-gijs
wants to merge
243
commits into
Querz:master
Choose a base branch
from
ens-gijs:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…IES (v1.17+) mca files
Exposed region xz getters setters on MCAFileBase Fixed template param on SectionedChunkBase
Enhancing test base assertThrowsNoException method to always report useful stacktrace (without using printStacktrace)
….18 21w44a (DV 2845) Adding a .md file to test resources to describe the properties of the test data for future reference.
Added informational getters to MCAFileBase to expose min and max data values as read from disk. Exposed ability for lib users to control the default data version of chunks auto-created by various MCAFile calls. Enhanced data version consistency throughout mca files, chunks, and sections. It should require much less care by this libraries users to maintain consistent data version values. Also added "createChunk" "createSection" helpers on MCAFile and Chunk respectively which will create objects with consistent data versions. Added explicit upgrade handling for Section blocks state when upgrading data versions from 1.14 and below to 1.15 and above. Improved consistency of Section "Y" values and to reduce risk of accidents for library users. It is still possible for a Section to have a "height" (aka Y) different from where the Chunk thinks it belongs, the Chunk has the final say now for sure and the occurrence of this inconsistency should be reduced.
…nient than using System.out for 100k of text
…rogression Realized 1.18 is making a lot of chunk data changes, backed out partial 1.18 support so far - going to rethink how best approach 1.18 region mca data Strengthened section-y synchronization and enforcement Added a 1.17.1 region mca file - interestingly section y's range from -1 to 15...
… before sending PR
…read implementations.
…sult when calling CompoundTag#getListTag
…mpoundTag data object. ChunkBase fixed bug in ctor - should call initReferences0
Any updates on this? |
… (nether portals are recorded in POI's)
… name assertLoadFLag. Completed test testChunkSectionMinMaxSectionY which was accidentally left incomplete in previous commit. ChunkIterator added currentWorldX/Z getters. Moved deserializeChunk impl from MCAFile into MCAFileBase
…tion to working with all long[] packed values (block palettes, biome palettes, Heightmaps) across all DataVersions.
- renaming 'capacity' to 'length' and exposed the final length variable publicly like a java array. - setting default builder PackingStrategy - changed builder set dataVersion behavior to treat 0 as 'use latest' - implementing Cloneable - adding count(IntPredicate) helper - renamed toValueArray functions to toArray - renamed setFromValueArray functions to setFromArray - added tests for all new functions & changes
…l TagWrapper's wrap CompoundTags
… Renamed getTag() to getHandle() matching TagWrapper name.
- implement TagWrapper - making use of LongArrayTagPackedIntegers instead of storing data in int[]
- adding lazy cubeEdgeLength() & squareEdgeLength() - adding helper get/set 2d/3d - adding toString overload
- adding toString - bugfix: ctor taking tag as arg was setting initializeForStoring to palette.size().. should be palette.size() - 1 - added test to cover this missed case
…ettizedCuboid class
- making set block and biome return bool indicating if the Y location exists - bugfix, get/set biome forgot to divide coords by 4
…initialize mca file header tables in readonly mode
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.