Skip to content

Commit

Permalink
toss a lot of redundant mappings (#630)
Browse files Browse the repository at this point in the history
* remove manual mapping of 'accept' and 'consume'

* map params in glScissor

* remove a lot of redundant blaze3d mappings

* get get

* work on removing more redundant data

* keep working

* DONE

* fix error

* drop empty mappings

* remove GLX class mapping

* Update mappings/net/minecraft/util/DelegatingDataOutput.mapping

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

* Update mappings/net/minecraft/nbt/AbstractNbtList.mapping

Co-authored-by: Eli Orona <[email protected]>

* Update mappings/com/mojang/blaze3d/systems/RenderSystem.mapping

Co-authored-by: Eli Orona <[email protected]>

* Update mappings/com/mojang/blaze3d/systems/RenderSystem.mapping

Co-authored-by: Eli Orona <[email protected]>

* Update mappings/net/minecraft/nbt/AbstractNbtList.mapping

Co-authored-by: Eli Orona <[email protected]>

* Update mappings/net/minecraft/nbt/AbstractNbtList.mapping

Co-authored-by: Eli Orona <[email protected]>

* Update mappings/com/mojang/blaze3d/texture/TextureUtil.mapping

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

* drop invalid mappings

* fix render system convention violations

* Revert "fix render system convention violations"

This reverts commit 3fdbc96.

* Update mappings/com/mojang/blaze3d/systems/RenderSystem.mapping

Co-authored-by: Eli Orona <[email protected]>

---------

Co-authored-by: Will <[email protected]>
Co-authored-by: Eli Orona <[email protected]>
  • Loading branch information
3 people authored Aug 28, 2024
1 parent 9a14caa commit c2895a0
Show file tree
Hide file tree
Showing 511 changed files with 769 additions and 1,440 deletions.
2 changes: 0 additions & 2 deletions mappings/com/mojang/blaze3d/font/Font.mapping
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
CLASS net/minecraft/unmapped/C_wywmjnuh com/mojang/blaze3d/font/Font
FIELD f_yricfcax BASELINE F
METHOD close close ()V
METHOD m_ftqqrdgk getProvidedGlyphs ()Lit/unimi/dsi/fastutil/ints/IntSet;
COMMENT {@return the set of code points for which this font can provide glyphs}
METHOD m_ojontmif getGlyph (I)Lnet/minecraft/unmapped/C_sxmfadan;
ARG 1 codePoint
CLASS C_bavmfosz Filtered
METHOD close close ()V
3 changes: 1 addition & 2 deletions mappings/com/mojang/blaze3d/font/Glyph.mapping
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
CLASS net/minecraft/unmapped/C_sxmfadan com/mojang/blaze3d/font/Glyph
METHOD bake bake (Ljava/util/function/Function;)Lnet/minecraft/unmapped/C_wrqtxozz;
METHOD bake (Ljava/util/function/Function;)Lnet/minecraft/unmapped/C_wrqtxozz;
ARG 1 baker
METHOD getAdvance getAdvance ()F
METHOD m_orjzkxxs getShadowOffset ()F
METHOD m_tbyurgqb getBoldOffset ()F
METHOD m_tivsypqx getAdvance (Z)F
Expand Down
1 change: 0 additions & 1 deletion mappings/com/mojang/blaze3d/glfw/Window.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ CLASS net/minecraft/unmapped/C_snosbckc com/mojang/blaze3d/glfw/Window
ARG 3 settings
ARG 4 videoMode
ARG 5 title
METHOD close close ()V
METHOD m_bvgeocso calculateScaleFactor (IZ)I
ARG 1 guiScale
ARG 2 forceUnicodeFont
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CLASS net/minecraft/unmapped/C_kceozcrb com/mojang/blaze3d/glfw/monitor/MonitorFactory
METHOD createMonitor createMonitor (J)Lnet/minecraft/unmapped/C_ykheakec;
METHOD createMonitor (J)Lnet/minecraft/unmapped/C_ykheakec;
ARG 1 window
22 changes: 8 additions & 14 deletions mappings/com/mojang/blaze3d/platform/GLX.mapping
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
CLASS com/mojang/blaze3d/platform/GLX com/mojang/blaze3d/platform/GLX
FIELD LOGGER LOGGER Lorg/slf4j/Logger;
FIELD cpuInfo cpuInfo Ljava/lang/String;
METHOD _getCpuInfo _getCpuInfo ()Ljava/lang/String;
METHOD _getLWJGLVersion _getLWJGLVersion ()Ljava/lang/String;
METHOD _getRefreshRate _getRefreshRate (Lnet/minecraft/unmapped/C_snosbckc;)I
CLASS com/mojang/blaze3d/platform/GLX
METHOD _getRefreshRate (Lnet/minecraft/unmapped/C_snosbckc;)I
ARG 0 window
METHOD _init _init (IZ)V
METHOD _init (IZ)V
ARG 0 debugVerbosity
ARG 1 debugSync
METHOD _initGlfw _initGlfw ()Ljava/util/function/LongSupplier;
METHOD _renderCrosshair _renderCrosshair (IZZZ)V
METHOD _renderCrosshair (IZZZ)V
ARG 0 size
ARG 1 drawX
ARG 2 drawY
ARG 3 drawZ
METHOD _setGlfwErrorCallback _setGlfwErrorCallback (Lorg/lwjgl/glfw/GLFWErrorCallbackI;)V
METHOD _setGlfwErrorCallback (Lorg/lwjgl/glfw/GLFWErrorCallbackI;)V
ARG 0 callback
METHOD _shouldClose _shouldClose (Lnet/minecraft/unmapped/C_snosbckc;)Z
METHOD _shouldClose (Lnet/minecraft/unmapped/C_snosbckc;)Z
ARG 0 window
METHOD getOpenGLVersionString getOpenGLVersionString ()Ljava/lang/String;
METHOD lambda$_initGlfw$0 (Ljava/lang/Integer;Ljava/lang/String;)V
ARG 0 error
ARG 1 description
METHOD lambda$_initGlfw$1 (Ljava/util/List;IJ)V
ARG 1 error
ARG 2 description
METHOD make make (Ljava/lang/Object;Ljava/util/function/Consumer;)Ljava/lang/Object;
METHOD make (Ljava/lang/Object;Ljava/util/function/Consumer;)Ljava/lang/Object;
ARG 0 object
ARG 1 initializer
METHOD make make (Ljava/util/function/Supplier;)Ljava/lang/Object;
METHOD make (Ljava/util/function/Supplier;)Ljava/lang/Object;
ARG 0 factory
100 changes: 0 additions & 100 deletions mappings/com/mojang/blaze3d/platform/GlConst.mapping

This file was deleted.

7 changes: 5 additions & 2 deletions mappings/com/mojang/blaze3d/platform/GlStateManager.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ CLASS com/mojang/blaze3d/platform/GlStateManager
ARG 4 format
ARG 5 type
ARG 6 pixels
METHOD _scissorBox (IIII)V
ARG 0 x
ARG 1 y
ARG 2 width
ARG 3 height
METHOD _stencilFunc (III)V
ARG 0 func
ARG 1 ref
Expand Down Expand Up @@ -399,10 +404,8 @@ CLASS com/mojang/blaze3d/platform/GlStateManager
FIELD f_sdyyvzqb capState Lcom/mojang/blaze3d/platform/GlStateManager$C_rfswymsl;
FIELD f_yedzzjzb dstFactorAlpha I
CLASS DestFactor DestFactor
FIELD value value I
METHOD <init> (Ljava/lang/String;II)V
ARG 3 value
CLASS SourceFactor SourceFactor
FIELD value value I
METHOD <init> (Ljava/lang/String;II)V
ARG 3 value
1 change: 0 additions & 1 deletion mappings/com/mojang/blaze3d/shader/GlUniform.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ CLASS net/minecraft/unmapped/C_guotmxqh com/mojang/blaze3d/shader/GlUniform
FIELD f_tnihwcgk LOGGER Lorg/slf4j/Logger;
FIELD f_uxiadpag TYPE_INT I
FIELD f_zqrszcix TYPE_MAT2 I
METHOD close close ()V
METHOD m_cjlwctzb uploadFloats ()V
METHOD m_crxlkxeu getDataType ()I
METHOD m_ffcwtjwl set (IF)V
Expand Down
Loading

1 comment on commit c2895a0

@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 c2895a0, 7 file(s) were updated with 14 line(s) added and 15 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/com/mojang/blaze3d/platform/GlStateManager.java namedSrc/com/mojang/blaze3d/platform/GlStateManager.java
--- namedTargetSrc/com/mojang/blaze3d/platform/GlStateManager.java	2024-08-28 15:27:07.679891117 +0000
+++ namedSrc/com/mojang/blaze3d/platform/GlStateManager.java	2024-08-28 15:25:55.843111390 +0000
@@ -130,9 +130,9 @@
     * @mapping {@literal hashed _scissorBox Lcom/mojang/blaze3d/platform/GlStateManager;_scissorBox(IIII)V}
     * @mapping {@literal named _scissorBox Lcom/mojang/blaze3d/platform/GlStateManager;_scissorBox(IIII)V}
     */
-   public static void _scissorBox(int i, int j, int k, int l) {
+   public static void _scissorBox(int x, int y, int width, int height) {
       RenderSystem.assertOnRenderThreadOrInit();
-      GL20.glScissor(i, j, k, l);
+      GL20.glScissor(x, y, width, height);
    }
 
    /**
diff -bur namedTargetSrc/com/mojang/blaze3d/systems/RenderSystem.java namedSrc/com/mojang/blaze3d/systems/RenderSystem.java
--- namedTargetSrc/com/mojang/blaze3d/systems/RenderSystem.java	2024-08-28 15:27:07.639890681 +0000
+++ namedSrc/com/mojang/blaze3d/systems/RenderSystem.java	2024-08-28 15:25:55.791110813 +0000
@@ -345,9 +345,9 @@
     * @mapping {@literal hashed enableScissor Lcom/mojang/blaze3d/systems/RenderSystem;enableScissor(IIII)V}
     * @mapping {@literal named enableScissor Lcom/mojang/blaze3d/systems/RenderSystem;enableScissor(IIII)V}
     */
-   public static void enableScissor(int i, int j, int k, int l) {
+   public static void enableScissor(int x, int y, int width, int height) {
       GlStateManager._enableScissorTest();
-      GlStateManager._scissorBox(i, j, k, l);
+      GlStateManager._scissorBox(x, y, width, height);
    }
 
    /**
diff -bur namedTargetSrc/com/mojang/blaze3d/texture/TextureUtil.java namedSrc/com/mojang/blaze3d/texture/TextureUtil.java
--- namedTargetSrc/com/mojang/blaze3d/texture/TextureUtil.java	2024-08-28 15:27:07.663890942 +0000
+++ namedSrc/com/mojang/blaze3d/texture/TextureUtil.java	2024-08-28 15:25:55.823111168 +0000
@@ -157,9 +157,9 @@
 
    /**
     * @mapping {@literal hashed writeAsPNG Lcom/mojang/blaze3d/platform/TextureUtil;writeAsPNG(Ljava/nio/file/Path;Ljava/lang/String;IIII)V}
-    * @mapping {@literal named writeAsPNG Lcom/mojang/blaze3d/texture/TextureUtil;writeAsPNG(Ljava/nio/file/Path;Ljava/lang/String;IIII)V}
+    * @mapping {@literal named writeAsPng Lcom/mojang/blaze3d/texture/TextureUtil;writeAsPng(Ljava/nio/file/Path;Ljava/lang/String;IIII)V}
     */
-   public static void writeAsPNG(Path path, String fileName, int textureId, int mipLevels, int width, int height) {
+   public static void writeAsPng(Path path, String fileName, int textureId, int mipLevels, int width, int height) {
       writeAsPNG(path, fileName, textureId, mipLevels, width, height, null);
    }
 
diff -bur namedTargetSrc/net/minecraft/client/render/item/ItemRenderer.java namedSrc/net/minecraft/client/render/item/ItemRenderer.java
--- namedTargetSrc/net/minecraft/client/render/item/ItemRenderer.java	2024-08-28 15:27:07.443888546 +0000
+++ namedSrc/net/minecraft/client/render/item/ItemRenderer.java	2024-08-28 15:25:55.551108192 +0000
@@ -191,7 +191,7 @@
     * 
     * @param stack the item stack
     * @param modelTransformationMode the model transformation mode
-    * @param leftHanded {@code true} if the the model is rendered in the left hand, or {@code false} otherwise
+    * @param leftHanded {@code true} if the model is rendered in the left hand, or {@code false} otherwise
     * @param matrices the matrix stack
     * @param vertexConsumers the vertex consumers
     * @param light the lightmap coordinates
diff -bur namedTargetSrc/net/minecraft/client/texture/SpriteAtlasTexture.java namedSrc/net/minecraft/client/texture/SpriteAtlasTexture.java
--- namedTargetSrc/net/minecraft/client/texture/SpriteAtlasTexture.java	2024-08-28 15:27:07.647890768 +0000
+++ namedSrc/net/minecraft/client/texture/SpriteAtlasTexture.java	2024-08-28 15:25:55.799110901 +0000
@@ -158,7 +158,7 @@
    @Override
    public void saveTo(Identifier textureId, Path directoryPath) throws IOException {
       String string = textureId.toUnderscoreSeparatedString();
-      TextureUtil.writeAsPNG(directoryPath, string, this.getGlId(), this.mipLevel, this.width, this.height);
+      TextureUtil.writeAsPng(directoryPath, string, this.getGlId(), this.mipLevel, this.width, this.height);
       dumpSpriteInfo(directoryPath, string, this.sprites);
    }
 
diff -bur namedTargetSrc/net/minecraft/nbt/NbtIo.java namedSrc/net/minecraft/nbt/NbtIo.java
--- namedTargetSrc/net/minecraft/nbt/NbtIo.java	2024-08-28 15:27:07.427888371 +0000
+++ namedSrc/net/minecraft/nbt/NbtIo.java	2024-08-28 15:25:55.535108020 +0000
@@ -497,16 +497,15 @@
       }
 
       /**
-       * @mapping {@literal hashed writeUTF Lnet/minecraft/unmapped/C_plrkqquc$C_wbbhdkdn;writeUTF(Ljava/lang/String;)V}
-       * @mapping {@literal named writeUTF Lnet/minecraft/nbt/NbtIo$StringFallbackDataOutput;writeUTF(Ljava/lang/String;)V}
+       * Mapping not found
        */
       @Override
-      public void writeUTF(String string) throws IOException {
+      public void writeUtf(String string) throws IOException {
          try {
-            super.writeUTF(string);
+            super.writeUtf(string);
          } catch (UTFDataFormatException var3) {
             Util.logAndPause("Failed to write NBT String", var3);
-            super.writeUTF("");
+            super.writeUtf("");
          }
       }
    }
diff -bur namedTargetSrc/net/minecraft/util/DelegatingDataOutput.java namedSrc/net/minecraft/util/DelegatingDataOutput.java
--- namedTargetSrc/net/minecraft/util/DelegatingDataOutput.java	2024-08-28 15:27:07.487889025 +0000
+++ namedSrc/net/minecraft/util/DelegatingDataOutput.java	2024-08-28 15:25:55.607108793 +0000
@@ -128,9 +128,9 @@
 
    /**
     * @mapping {@literal hashed writeUTF Lnet/minecraft/unmapped/C_hydfible;writeUTF(Ljava/lang/String;)V}
-    * @mapping {@literal named writeUTF Lnet/minecraft/util/DelegatingDataOutput;writeUTF(Ljava/lang/String;)V}
+    * @mapping {@literal named writeUtf Lnet/minecraft/util/DelegatingDataOutput;writeUtf(Ljava/lang/String;)V}
     */
-   public void writeUTF(String string) throws IOException {
+   public void writeUtf(String string) throws IOException {
       this.delegate.writeUTF(string);
    }
 }

Please sign in to comment.