Skip to content

Commit

Permalink
add mappings for Rarity (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLadyLuthien authored Jan 6, 2025
1 parent 17a20e1 commit d35c987
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mappings/net/minecraft/util/Rarity.mapping
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CLASS net/minecraft/unmapped/C_mqmixksm net/minecraft/util/Rarity
FIELD f_efjldeaw formatting Lnet/minecraft/unmapped/C_tnezalvh;
FIELD f_gahweovi name Ljava/lang/String;
METHOD m_waqdxpfx getFormatting ()Lnet/minecraft/unmapped/C_tnezalvh;

1 comment on commit d35c987

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With commit d35c987, 14 file(s) were updated with 36 line(s) added and 34 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/client/gui/hud/in_game/InGameHud.java namedSrc/net/minecraft/client/gui/hud/in_game/InGameHud.java
--- namedTargetSrc/net/minecraft/client/gui/hud/in_game/InGameHud.java	2025-01-06 01:14:01.496263972 +0000
+++ namedSrc/net/minecraft/client/gui/hud/in_game/InGameHud.java	2025-01-06 01:12:53.196011516 +0000
@@ -1020,7 +1020,7 @@
    private void renderHeldItemTooltip(GuiGraphics graphics) {
       this.client.getProfiler().push("selectedItemName");
       if (this.heldItemTooltipFade > 0 && !this.currentStack.isEmpty()) {
-         MutableText lv = Text.empty().append(this.currentStack.getName()).formatted(this.currentStack.getRarity().m_waqdxpfx());
+         MutableText lv = Text.empty().append(this.currentStack.getName()).formatted(this.currentStack.getRarity().getFormatting());
          if (this.currentStack.contains(DataComponentTypes.CUSTOM_NAME)) {
             lv.formatted(Formatting.ITALIC);
          }
diff -bur namedTargetSrc/net/minecraft/client/gui/ParentElement.java namedSrc/net/minecraft/client/gui/ParentElement.java
--- namedTargetSrc/net/minecraft/client/gui/ParentElement.java	2025-01-06 01:14:01.500263987 +0000
+++ namedSrc/net/minecraft/client/gui/ParentElement.java	2025-01-06 01:12:53.204011545 +0000
@@ -153,7 +153,7 @@
     * Mapping not found
     */
    @Override
-   default void setFocused(boolean focused) {
+   default void setFocused(boolean bl) {
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/client/gui/screen/realms/RealmsMainScreen.java namedSrc/net/minecraft/client/gui/screen/realms/RealmsMainScreen.java
--- namedTargetSrc/net/minecraft/client/gui/screen/realms/RealmsMainScreen.java	2025-01-06 01:14:01.616264421 +0000
+++ namedSrc/net/minecraft/client/gui/screen/realms/RealmsMainScreen.java	2025-01-06 01:12:53.344012077 +0000
@@ -1506,9 +1506,9 @@
        * Mapping not found
        */
       @Override
-      public void setFocused(boolean focused) {
-         super.setFocused(focused);
-         this.button.setFocused(focused);
+      public void setFocused(boolean bl) {
+         super.setFocused(bl);
+         this.button.setFocused(bl);
       }
 
       /**
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/ClickableWidget.java namedSrc/net/minecraft/client/gui/widget/ClickableWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/ClickableWidget.java	2025-01-06 01:14:01.640264511 +0000
+++ namedSrc/net/minecraft/client/gui/widget/ClickableWidget.java	2025-01-06 01:12:53.376012199 +0000
@@ -440,8 +440,8 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
-      this.focused = focused;
+   public void setFocused(boolean bl) {
+      this.focused = bl;
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/DraggingWidget.java namedSrc/net/minecraft/client/gui/widget/DraggingWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/DraggingWidget.java	2025-01-06 01:14:01.504264002 +0000
+++ namedSrc/net/minecraft/client/gui/widget/DraggingWidget.java	2025-01-06 01:12:53.212011577 +0000
@@ -120,7 +120,7 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
-      ParentElement.super.setFocused(focused);
+   public void setFocused(boolean bl) {
+      ParentElement.super.setFocused(bl);
    }
 }
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/EditBoxWidget.java namedSrc/net/minecraft/client/gui/widget/EditBoxWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/EditBoxWidget.java	2025-01-06 01:14:01.596264346 +0000
+++ namedSrc/net/minecraft/client/gui/widget/EditBoxWidget.java	2025-01-06 01:12:53.324012001 +0000
@@ -342,9 +342,9 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
-      super.setFocused(focused);
-      if (focused) {
+   public void setFocused(boolean bl) {
+      super.setFocused(bl);
+      if (bl) {
          this.focusTime = Util.getMeasuringTimeMs();
       }
    }
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/HeaderBar.java namedSrc/net/minecraft/client/gui/widget/HeaderBar.java
--- namedTargetSrc/net/minecraft/client/gui/widget/HeaderBar.java	2025-01-06 01:14:01.692264705 +0000
+++ namedSrc/net/minecraft/client/gui/widget/HeaderBar.java	2025-01-06 01:12:53.432012413 +0000
@@ -122,10 +122,10 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
-      super.setFocused(focused);
+   public void setFocused(boolean bl) {
+      super.setFocused(bl);
       if (this.getFocused() != null) {
-         this.getFocused().setFocused(focused);
+         this.getFocused().setFocused(bl);
       }
    }
 
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java namedSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java	2025-01-06 01:14:01.412263658 +0000
+++ namedSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java	2025-01-06 01:12:53.100011151 +0000
@@ -894,7 +894,7 @@
        * @mapping {@literal named setFocused Lnet/minecraft/client/gui/widget/list/EntryListWidget$Entry;setFocused(Z)V}
        */
       @Override
-      public void setFocused(boolean focused) {
+      public void setFocused(boolean bl) {
       }
 
       /**
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java	2025-01-06 01:14:01.508264017 +0000
+++ namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java	2025-01-06 01:12:53.212011577 +0000
@@ -289,7 +289,7 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
+   public void setFocused(boolean bl) {
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java	2025-01-06 01:14:01.648264541 +0000
+++ namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java	2025-01-06 01:12:53.384012229 +0000
@@ -645,7 +645,7 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
+   public void setFocused(boolean bl) {
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/SliderWidget.java namedSrc/net/minecraft/client/gui/widget/SliderWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/SliderWidget.java	2025-01-06 01:14:01.400263613 +0000
+++ namedSrc/net/minecraft/client/gui/widget/SliderWidget.java	2025-01-06 01:12:53.088011106 +0000
@@ -145,9 +145,9 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
-      super.setFocused(focused);
-      if (!focused) {
+   public void setFocused(boolean bl) {
+      super.setFocused(bl);
+      if (!bl) {
          this.mutable = false;
       } else {
          InputType lv = MinecraftClient.getInstance().getLastInputType();
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/TextFieldWidget.java namedSrc/net/minecraft/client/gui/widget/TextFieldWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/TextFieldWidget.java	2025-01-06 01:14:01.436263747 +0000
+++ namedSrc/net/minecraft/client/gui/widget/TextFieldWidget.java	2025-01-06 01:12:53.132011272 +0000
@@ -737,10 +737,10 @@
     * Mapping not found
     */
    @Override
-   public void setFocused(boolean focused) {
-      if (this.focusUnlocked || focused) {
-         super.setFocused(focused);
-         if (focused) {
+   public void setFocused(boolean bl) {
+      if (this.focusUnlocked || bl) {
+         super.setFocused(bl);
+         if (bl) {
             this.lastFocusTime = Util.getMeasuringTimeMs();
          }
       }
diff -bur namedTargetSrc/net/minecraft/item/ItemStack.java namedSrc/net/minecraft/item/ItemStack.java
--- namedTargetSrc/net/minecraft/item/ItemStack.java	2025-01-06 01:14:01.444263777 +0000
+++ namedSrc/net/minecraft/item/ItemStack.java	2025-01-06 01:12:53.144011317 +0000
@@ -1264,7 +1264,7 @@
          return List.of();
       } else {
          List<Text> list = Lists.<Text>newArrayList();
-         MutableText lv = Text.empty().append(this.getName()).formatted(this.getRarity().m_waqdxpfx());
+         MutableText lv = Text.empty().append(this.getName()).formatted(this.getRarity().getFormatting());
          if (this.contains(DataComponentTypes.CUSTOM_NAME)) {
             lv.formatted(Formatting.ITALIC);
          }
@@ -1547,7 +1547,7 @@
 
       MutableText lv2 = Texts.bracketed(lv);
       if (!this.isEmpty()) {
-         lv2.formatted(this.getRarity().m_waqdxpfx())
+         lv2.formatted(this.getRarity().getFormatting())
             .styled(style -> style.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new HoverEvent.ItemStackContent(this))));
       }
 
diff -bur namedTargetSrc/net/minecraft/util/Rarity.java namedSrc/net/minecraft/util/Rarity.java
--- namedTargetSrc/net/minecraft/util/Rarity.java	2025-01-06 01:14:01.592264331 +0000
+++ namedSrc/net/minecraft/util/Rarity.java	2025-01-06 01:12:53.320011987 +0000
@@ -51,9 +51,10 @@
     */
    private final int f_vjzoaznr;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_gahweovi Lnet/minecraft/unmapped/C_mqmixksm;f_gahweovi:Ljava/lang/String;}
+    * @mapping {@literal named name Lnet/minecraft/util/Rarity;name:Ljava/lang/String;}
     */
-   private final String f_gahweovi;
+   private final String name;
    /**
     * @mapping {@literal hashed f_efjldeaw Lnet/minecraft/unmapped/C_mqmixksm;f_efjldeaw:Lnet/minecraft/unmapped/C_tnezalvh;}
     * @mapping {@literal named formatting Lnet/minecraft/util/Rarity;formatting:Lnet/minecraft/util/Formatting;}
@@ -64,16 +65,17 @@
     * @mapping {@literal hashed <init> Lnet/minecraft/unmapped/C_mqmixksm;<init>(Ljava/lang/String;IILjava/lang/String;Lnet/minecraft/unmapped/C_tnezalvh;)V}
     * @mapping {@literal named <init> Lnet/minecraft/util/Rarity;<init>(Ljava/lang/String;IILjava/lang/String;Lnet/minecraft/util/Formatting;)V}
     */
-   private Rarity(final int j, final String string2, final Formatting formatting) {
+   private Rarity(final int j, final String name, final Formatting formatting) {
       this.f_vjzoaznr = j;
-      this.f_gahweovi = string2;
+      this.name = name;
       this.formatting = formatting;
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed m_waqdxpfx Lnet/minecraft/unmapped/C_mqmixksm;m_waqdxpfx()Lnet/minecraft/unmapped/C_tnezalvh;}
+    * @mapping {@literal named getFormatting Lnet/minecraft/util/Rarity;getFormatting()Lnet/minecraft/util/Formatting;}
     */
-   public Formatting m_waqdxpfx() {
+   public Formatting getFormatting() {
       return this.formatting;
    }
 
@@ -82,6 +84,6 @@
     */
    @Override
    public String asString() {
-      return this.f_gahweovi;
+      return this.name;
    }
 }

Please sign in to comment.