EngineHub / WorldEdit

🗺️ Minecraft map editor and mod
https://enginehub.org/worldedit/
Other
3.09k stars 837 forks source link

Make the Vector classes into Records #2477

Closed me4502 closed 7 months ago

me4502 commented 7 months ago

This turns the vector classes into records, to make use of the various syntactical features that have been added to Java recently around records.

The old getters were deprecated in favour of the record accessors. The block-grid accessors were deprecated in the BlockVector classes, and new ones were added to the Vector classes, as it makes much more sense for those to exist in the non-block version.

This PR does not update any usages within WorldEdit, therefore this PR will substantially increase the number of deprecation warnings in the codebase. However, this makes sense to keep the PR small. Cleanups can happen in future PRs.