From 7247b723405d9f37746c5d727dc3eddfd193199e Mon Sep 17 00:00:00 2001 From: Will Date: Sat, 4 Jan 2025 17:29:04 -0800 Subject: [PATCH] 1.21 fix final (#674) * 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 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 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../net/minecraft/entity/InteractionEntity.mapping | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mappings/net/minecraft/entity/InteractionEntity.mapping b/mappings/net/minecraft/entity/InteractionEntity.mapping index 49badcad4f..aa477d8692 100644 --- a/mappings/net/minecraft/entity/InteractionEntity.mapping +++ b/mappings/net/minecraft/entity/InteractionEntity.mapping @@ -2,22 +2,22 @@ CLASS net/minecraft/unmapped/C_hvnhlgso net/minecraft/entity/InteractionEntity FIELD f_ckdsvier WIDTH_KEY Ljava/lang/String; FIELD f_ctyumtqt interaction Lnet/minecraft/unmapped/C_hvnhlgso$C_nzivpjdf; FIELD f_jzdfpkpp attack Lnet/minecraft/unmapped/C_hvnhlgso$C_nzivpjdf; - FIELD f_luxekrhz HEIGHT Lnet/minecraft/unmapped/C_rinmcaxy; - FIELD f_rmbogufh WIDTH Lnet/minecraft/unmapped/C_rinmcaxy; + FIELD f_luxekrhz INTERACTION_HEIGHT Lnet/minecraft/unmapped/C_rinmcaxy; + FIELD f_rmbogufh INTERACTION_WIDTH Lnet/minecraft/unmapped/C_rinmcaxy; FIELD f_vvmxstjr INTERACTION_KEY Ljava/lang/String; FIELD f_vxdufukm RESPONSE Lnet/minecraft/unmapped/C_rinmcaxy; FIELD f_xnjxidmy ATTACK_KEY Ljava/lang/String; FIELD f_ygkdbibs HEIGHT_KEY Ljava/lang/String; FIELD f_ztmqbiqd RESPONSE_KEY Ljava/lang/String; - METHOD m_acettnna getDimensions ()Lnet/minecraft/unmapped/C_sszpscpo; - METHOD m_dyvbaohz getHeight ()F - METHOD m_mcajgzfg getWidth ()F + METHOD m_acettnna getInteractionDimensions ()Lnet/minecraft/unmapped/C_sszpscpo; + METHOD m_dyvbaohz getInteractionHeight ()F + METHOD m_mcajgzfg getInteractionWidth ()F METHOD m_oeurfxnz setResponse (Z)V ARG 1 response METHOD m_stegizgr getResponse ()Z - METHOD m_uesbqavb setWidth (F)V + METHOD m_uesbqavb setInteractionWidth (F)V ARG 1 width - METHOD m_yvnkyldm setHeight (F)V + METHOD m_yvnkyldm setInteractionHeight (F)V ARG 1 height CLASS C_nzivpjdf Interaction FIELD f_dckrisox CODEC Lcom/mojang/serialization/Codec;