Skip to content
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

add mappings for Rarity #678

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

TheLadyLuthien
Copy link
Contributor

Add mappings to the net.minecraft.util.Rarity class for its name field and its formatting getter method. The name for the String field comes from other implementations of StringIdentifiable such as DyeColor, Direction, and LiquidSettings where they all have a matching field named name. The formatting getter was named following the convention for non-boolean getters as getFormatting.

I'm glad to find a way I can help contribute back to quilt!

@supersaiyansubtlety supersaiyansubtlety added t: new adds new mappings v: release targets a release version of minecraft s: tiny PRs with less than 50 lines labels Jan 3, 2025
@supersaiyansubtlety supersaiyansubtlety added the final-comment-period is approved and will soon be merged if no issues are raised label Jan 3, 2025
@supersaiyansubtlety supersaiyansubtlety merged commit d35c987 into QuiltMC:1.21.1 Jan 6, 2025
9 checks passed
supersaiyansubtlety added a commit that referenced this pull request Jan 7, 2025
* 1.21.1 fix final (#675)

* Enchantment and tool work (#585)

* complete components, text, and village

* shown in tooltip

* tooltip config

* Completed several enchantment-related classes and ToolComponent

* fixed typos and javadoc references

* refined/reworked some names, added javadoc formatting, fixed hasSpace -> hasSpaceBelow and params

* Update mappings/net/minecraft/entity/player/PlayerEntity.mapping

Fix typo

* requiresTool/doesRequireTool -> toolRequired/isToolRequired

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BoatEntity` mappings. (#586)

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well
- `landFriction` -> `groundFriction`; to match `getGroundFriction`
I considered renaming all `ground` -> `land` in `BoatEntity` to be consistent with `Location.ON_LAND`, but `Entity.fall`'s `onGround` param traces back to a string, so they can't be completely reconciled, and `ground` is used more in other classes and I think is slightly better in most cases.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BookEditScreen` and related names. (#587)

* fixed BookEditScreen #writeNbtData -> #updateBookComponent

* Improved some `BookEditScreen` and related names.
Notably:
- **fixed**  `#writeNbtData` -> `#updateBookComponent`
- `PageContent` -> `Display`; it's not just content, it's only used for the current page, and having fields of `String`s, `int`s, and this all called "pages" was confusing. Mojmap is `DisplayCache`, but the field that holds the current instance is the cache of this, the display.

* LecterScreenHandler #getBookItem -> #getBook

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix 'overrides final method' error

* update InteractionEntity's tracked data fields to match method name changes

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update enigma and plugin for 1.21.1 (#682)

update enigma and plugin to latest

* add mappings for Rarity (#678)

* add missing CommonColor constants (#679)

* add missing CommonColor constants

* clarify ALTERNATE_WHITE to LIGHTER_GRAY

Co-authored-by: Will <[email protected]>

---------

Co-authored-by: Will <[email protected]>

* add mappings for LocationPredicate.Builder fields and setter methods (#680)

* add mappings for LocationPredicate.Builder fields and setter methods

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

---------

Co-authored-by: Will <[email protected]>

* update engima to 2.5.3

* drop invalid mappings 1.21.1

* drop invalid mappings 1.21.2

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ThatSkadoosh <[email protected]>
supersaiyansubtlety added a commit that referenced this pull request Jan 7, 2025
* 1.21.1 fix final (#675)

* Enchantment and tool work (#585)

* complete components, text, and village

* shown in tooltip

* tooltip config

* Completed several enchantment-related classes and ToolComponent

* fixed typos and javadoc references

* refined/reworked some names, added javadoc formatting, fixed hasSpace -> hasSpaceBelow and params

* Update mappings/net/minecraft/entity/player/PlayerEntity.mapping

Fix typo

* requiresTool/doesRequireTool -> toolRequired/isToolRequired

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BoatEntity` mappings. (#586)

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well
- `landFriction` -> `groundFriction`; to match `getGroundFriction`
I considered renaming all `ground` -> `land` in `BoatEntity` to be consistent with `Location.ON_LAND`, but `Entity.fall`'s `onGround` param traces back to a string, so they can't be completely reconciled, and `ground` is used more in other classes and I think is slightly better in most cases.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BookEditScreen` and related names. (#587)

* fixed BookEditScreen #writeNbtData -> #updateBookComponent

* Improved some `BookEditScreen` and related names.
Notably:
- **fixed**  `#writeNbtData` -> `#updateBookComponent`
- `PageContent` -> `Display`; it's not just content, it's only used for the current page, and having fields of `String`s, `int`s, and this all called "pages" was confusing. Mojmap is `DisplayCache`, but the field that holds the current instance is the cache of this, the display.

* LecterScreenHandler #getBookItem -> #getBook

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix 'overrides final method' error

* update InteractionEntity's tracked data fields to match method name changes

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* 1.21.2 fix final (#676)

* Enchantment and tool work (#585)

* complete components, text, and village

* shown in tooltip

* tooltip config

* Completed several enchantment-related classes and ToolComponent

* fixed typos and javadoc references

* refined/reworked some names, added javadoc formatting, fixed hasSpace -> hasSpaceBelow and params

* Update mappings/net/minecraft/entity/player/PlayerEntity.mapping

Fix typo

* requiresTool/doesRequireTool -> toolRequired/isToolRequired

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BoatEntity` mappings. (#586)

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well
- `landFriction` -> `groundFriction`; to match `getGroundFriction`
I considered renaming all `ground` -> `land` in `BoatEntity` to be consistent with `Location.ON_LAND`, but `Entity.fall`'s `onGround` param traces back to a string, so they can't be completely reconciled, and `ground` is used more in other classes and I think is slightly better in most cases.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BookEditScreen` and related names. (#587)

* fixed BookEditScreen #writeNbtData -> #updateBookComponent

* Improved some `BookEditScreen` and related names.
Notably:
- **fixed**  `#writeNbtData` -> `#updateBookComponent`
- `PageContent` -> `Display`; it's not just content, it's only used for the current page, and having fields of `String`s, `int`s, and this all called "pages" was confusing. Mojmap is `DisplayCache`, but the field that holds the current instance is the cache of this, the display.

* LecterScreenHandler #getBookItem -> #getBook

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix 'overrides final method' error

* update InteractionEntity's tracked data fields to match method name changes

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update enigma and plugin for 1.21.1 (#682)

update enigma and plugin to latest

* add mappings for Rarity (#678)

* add missing CommonColor constants (#679)

* add missing CommonColor constants

* clarify ALTERNATE_WHITE to LIGHTER_GRAY

Co-authored-by: Will <[email protected]>

---------

Co-authored-by: Will <[email protected]>

* add mappings for LocationPredicate.Builder fields and setter methods (#680)

* add mappings for LocationPredicate.Builder fields and setter methods

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

---------

Co-authored-by: Will <[email protected]>

* update engima to 2.5.3

* drop invalid mappings 1.21.1

* drop invalid mappings 1.21.2

* fix MAX_COLLISION_COLLECTION_BLOCK_ITERATIONS

* fix missing param name which broke javadoc

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ThatSkadoosh <[email protected]>
supersaiyansubtlety added a commit that referenced this pull request Jan 7, 2025
* 1.21.1 fix final (#675)

* Enchantment and tool work (#585)

* complete components, text, and village

* shown in tooltip

* tooltip config

* Completed several enchantment-related classes and ToolComponent

* fixed typos and javadoc references

* refined/reworked some names, added javadoc formatting, fixed hasSpace -> hasSpaceBelow and params

* Update mappings/net/minecraft/entity/player/PlayerEntity.mapping

Fix typo

* requiresTool/doesRequireTool -> toolRequired/isToolRequired

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BoatEntity` mappings. (#586)

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well
- `landFriction` -> `groundFriction`; to match `getGroundFriction`
I considered renaming all `ground` -> `land` in `BoatEntity` to be consistent with `Location.ON_LAND`, but `Entity.fall`'s `onGround` param traces back to a string, so they can't be completely reconciled, and `ground` is used more in other classes and I think is slightly better in most cases.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BookEditScreen` and related names. (#587)

* fixed BookEditScreen #writeNbtData -> #updateBookComponent

* Improved some `BookEditScreen` and related names.
Notably:
- **fixed**  `#writeNbtData` -> `#updateBookComponent`
- `PageContent` -> `Display`; it's not just content, it's only used for the current page, and having fields of `String`s, `int`s, and this all called "pages" was confusing. Mojmap is `DisplayCache`, but the field that holds the current instance is the cache of this, the display.

* LecterScreenHandler #getBookItem -> #getBook

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix 'overrides final method' error

* update InteractionEntity's tracked data fields to match method name changes

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* 1.21.2 fix final (#676)

* Enchantment and tool work (#585)

* complete components, text, and village

* shown in tooltip

* tooltip config

* Completed several enchantment-related classes and ToolComponent

* fixed typos and javadoc references

* refined/reworked some names, added javadoc formatting, fixed hasSpace -> hasSpaceBelow and params

* Update mappings/net/minecraft/entity/player/PlayerEntity.mapping

Fix typo

* requiresTool/doesRequireTool -> toolRequired/isToolRequired

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BoatEntity` mappings. (#586)

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well
- `landFriction` -> `groundFriction`; to match `getGroundFriction`
I considered renaming all `ground` -> `land` in `BoatEntity` to be consistent with `Location.ON_LAND`, but `Entity.fall`'s `onGround` param traces back to a string, so they can't be completely reconciled, and `ground` is used more in other classes and I think is slightly better in most cases.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BookEditScreen` and related names. (#587)

* fixed BookEditScreen #writeNbtData -> #updateBookComponent

* Improved some `BookEditScreen` and related names.
Notably:
- **fixed**  `#writeNbtData` -> `#updateBookComponent`
- `PageContent` -> `Display`; it's not just content, it's only used for the current page, and having fields of `String`s, `int`s, and this all called "pages" was confusing. Mojmap is `DisplayCache`, but the field that holds the current instance is the cache of this, the display.

* LecterScreenHandler #getBookItem -> #getBook

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix 'overrides final method' error

* update InteractionEntity's tracked data fields to match method name changes

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* 1.21.3 fix final (#677)

* Enchantment and tool work (#585)

* complete components, text, and village

* shown in tooltip

* tooltip config

* Completed several enchantment-related classes and ToolComponent

* fixed typos and javadoc references

* refined/reworked some names, added javadoc formatting, fixed hasSpace -> hasSpaceBelow and params

* Update mappings/net/minecraft/entity/player/PlayerEntity.mapping

Fix typo

* requiresTool/doesRequireTool -> toolRequired/isToolRequired

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BoatEntity` mappings. (#586)

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well

* Improved some `BoatEntity` mappings.
- `checkBoatInWater` -> `isInWater`; conventional and consistent with `Location.IN_WATER`
- `checkLocation` -> `updateLocation`; a bit of an odd one, `updateLandFractionAndGetLocation` would be a verbose literal name, I think `updateLocation` communicates that reasonably well
- `landFriction` -> `groundFriction`; to match `getGroundFriction`
I considered renaming all `ground` -> `land` in `BoatEntity` to be consistent with `Location.ON_LAND`, but `Entity.fall`'s `onGround` param traces back to a string, so they can't be completely reconciled, and `ground` is used more in other classes and I think is slightly better in most cases.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Improved some `BookEditScreen` and related names. (#587)

* fixed BookEditScreen #writeNbtData -> #updateBookComponent

* Improved some `BookEditScreen` and related names.
Notably:
- **fixed**  `#writeNbtData` -> `#updateBookComponent`
- `PageContent` -> `Display`; it's not just content, it's only used for the current page, and having fields of `String`s, `int`s, and this all called "pages" was confusing. Mojmap is `DisplayCache`, but the field that holds the current instance is the cache of this, the display.

* LecterScreenHandler #getBookItem -> #getBook

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix 'overrides final method' error

* update InteractionEntity's tracked data fields to match method name changes

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update enigma and plugin for 1.21.1 (#682)

update enigma and plugin to latest

* add mappings for Rarity (#678)

* add missing CommonColor constants (#679)

* add missing CommonColor constants

* clarify ALTERNATE_WHITE to LIGHTER_GRAY

Co-authored-by: Will <[email protected]>

---------

Co-authored-by: Will <[email protected]>

* add mappings for LocationPredicate.Builder fields and setter methods (#680)

* add mappings for LocationPredicate.Builder fields and setter methods

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

* Update mappings/net/minecraft/predicate/entity/LocationPredicate.mapping

Co-authored-by: Will <[email protected]>

---------

Co-authored-by: Will <[email protected]>

* update engima to 2.5.3

* drop invalid mappings 1.21.1

* drop invalid mappings 1.21.2

* fix MAX_COLLISION_COLLECTION_BLOCK_ITERATIONS

* fix missing param name which broke javadoc

---------

Co-authored-by: ix0rai <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ThatSkadoosh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final-comment-period is approved and will soon be merged if no issues are raised s: tiny PRs with less than 50 lines t: new adds new mappings v: release targets a release version of minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants