Skip to content

Commit

Permalink
fix render system convention violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Aug 23, 2024
1 parent a93317c commit 3fdbc96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mappings/com/mojang/blaze3d/systems/RenderSystem.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ CLASS com/mojang/blaze3d/systems/RenderSystem
FIELD MAX_SUPPORTED_TEXTURE_SIZE maxSupportedTextureSize I
FIELD RENDER_THREAD_TESSELATOR RENDER_THREAD_TESSELLATOR Lnet/minecraft/unmapped/C_hiiunyvh;
FIELD modelViewStack MODEL_VIEW_STACK Lorg/joml/Matrix4fStack;
FIELD pollEventsWaitStart POLL_EVENTS_WAIT_START Ljava/util/concurrent/atomic/AtomicLong;
FIELD pollingEvents POLLING_EVENTS Ljava/util/concurrent/atomic/AtomicBoolean;
FIELD recordingQueue RECORDING_QUEUE Ljava/util/concurrent/ConcurrentLinkedQueue;
FIELD shaderColor SHADER_COLOR [F
FIELD shaderLightDirections SHADER_LIGHT_DIRECTIONS [Lorg/joml/Vector3f;
Expand Down

1 comment on commit 3fdbc96

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 3fdbc96, 8 file(s) were updated with 28 line(s) added and 29 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-23 04:07:51.589258652 +0000
+++ namedSrc/com/mojang/blaze3d/platform/GlStateManager.java	2024-08-23 04:06:41.828582608 +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-23 04:07:51.537258134 +0000
+++ namedSrc/com/mojang/blaze3d/systems/RenderSystem.java	2024-08-23 04:06:41.788582207 +0000
@@ -194,14 +194,14 @@
    private static C_kfcjpoxm shader;
    /**
     * @mapping {@literal hashed pollEventsWaitStart Lcom/mojang/blaze3d/systems/RenderSystem;pollEventsWaitStart:Ljava/util/concurrent/atomic/AtomicLong;}
-    * @mapping {@literal named pollEventsWaitStart Lcom/mojang/blaze3d/systems/RenderSystem;pollEventsWaitStart:Ljava/util/concurrent/atomic/AtomicLong;}
+    * @mapping {@literal named POLL_EVENTS_WAIT_START Lcom/mojang/blaze3d/systems/RenderSystem;POLL_EVENTS_WAIT_START:Ljava/util/concurrent/atomic/AtomicLong;}
     */
-   private static final AtomicLong pollEventsWaitStart = new AtomicLong();
+   private static final AtomicLong POLL_EVENTS_WAIT_START = new AtomicLong();
    /**
     * @mapping {@literal hashed pollingEvents Lcom/mojang/blaze3d/systems/RenderSystem;pollingEvents:Ljava/util/concurrent/atomic/AtomicBoolean;}
-    * @mapping {@literal named pollingEvents Lcom/mojang/blaze3d/systems/RenderSystem;pollingEvents:Ljava/util/concurrent/atomic/AtomicBoolean;}
+    * @mapping {@literal named POLLING_EVENTS Lcom/mojang/blaze3d/systems/RenderSystem;POLLING_EVENTS:Ljava/util/concurrent/atomic/AtomicBoolean;}
     */
-   private static final AtomicBoolean pollingEvents = new AtomicBoolean(false);
+   private static final AtomicBoolean POLLING_EVENTS = new AtomicBoolean(false);
 
    /**
     * @mapping {@literal hashed initRenderThread Lcom/mojang/blaze3d/systems/RenderSystem;initRenderThread()V}
@@ -272,10 +272,10 @@
     * @mapping {@literal named pollEvents Lcom/mojang/blaze3d/systems/RenderSystem;pollEvents()V}
     */
    private static void pollEvents() {
-      pollEventsWaitStart.set(Util.getMeasuringTimeMs());
-      pollingEvents.set(true);
+      POLL_EVENTS_WAIT_START.set(Util.getMeasuringTimeMs());
+      POLLING_EVENTS.set(true);
       GLFW.glfwPollEvents();
-      pollingEvents.set(false);
+      POLLING_EVENTS.set(false);
    }
 
    /**
@@ -283,7 +283,7 @@
     * @mapping {@literal named isFrozenAtPollEvents Lcom/mojang/blaze3d/systems/RenderSystem;isFrozenAtPollEvents()Z}
     */
    public static boolean isFrozenAtPollEvents() {
-      return pollingEvents.get() && Util.getMeasuringTimeMs() - pollEventsWaitStart.get() > 200L;
+      return POLLING_EVENTS.get() && Util.getMeasuringTimeMs() - POLL_EVENTS_WAIT_START.get() > 200L;
    }
 
    /**
@@ -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);
    }
 
    /**
@@ -644,9 +644,9 @@
     * @mapping {@literal hashed setShaderFog Lcom/mojang/blaze3d/systems/RenderSystem;setShaderFog(Lnet/minecraft/unmapped/C_vidgpspy;)V}
     * @mapping {@literal named setShaderFog Lcom/mojang/blaze3d/systems/RenderSystem;setShaderFog(Lnet/minecraft/client/render/FogParameters;)V}
     */
-   public static void setShaderFog(FogParameters fog) {
+   public static void setShaderFog(FogParameters arg) {
       assertOnRenderThread();
-      shaderFog = fog;
+      shaderFog = arg;
    }
 
    /**
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-23 04:07:51.573258492 +0000
+++ namedSrc/com/mojang/blaze3d/texture/TextureUtil.java	2024-08-23 04:06:41.816582488 +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-23 04:07:51.329256067 +0000
+++ namedSrc/net/minecraft/client/render/item/ItemRenderer.java	2024-08-23 04:06:41.548579799 +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/render/SkyRenderer.java namedSrc/net/minecraft/client/render/SkyRenderer.java
--- namedTargetSrc/net/minecraft/client/render/SkyRenderer.java	2024-08-23 04:07:51.501257776 +0000
+++ namedSrc/net/minecraft/client/render/SkyRenderer.java	2024-08-23 04:06:41.756581887 +0000
@@ -184,7 +184,7 @@
     * @mapping {@literal named renderCelestialObjects Lnet/minecraft/client/render/SkyRenderer;renderCelestialObjects(Lnet/minecraft/client/util/math/MatrixStack;Lcom/mojang/blaze3d/vertex/Tessellator;FIFFLnet/minecraft/client/render/FogParameters;)V}
     */
    public void renderCelestialObjects(
-      MatrixStack matrices, Tessellator tessellator, float skyAngle, int moonPhase, float objectVisibility, float starBrightness, FogParameters fog
+      MatrixStack matrices, Tessellator tessellator, float skyAngle, int moonPhase, float objectVisibility, float starBrightness, FogParameters arg3
    ) {
       matrices.push();
       matrices.rotate(Axis.Y_POSITIVE.rotationDegrees(-90.0F));
@@ -192,7 +192,7 @@
       this.renderSun(objectVisibility, tessellator, matrices);
       this.renderMoon(moonPhase, objectVisibility, tessellator, matrices);
       if (starBrightness > 0.0F) {
-         this.renderStars(fog, starBrightness, matrices);
+         this.renderStars(arg3, starBrightness, matrices);
       }
 
       matrices.pop();
@@ -260,7 +260,7 @@
     * @mapping {@literal hashed m_oksqohzv Lnet/minecraft/unmapped/C_tltwgmmc;m_oksqohzv(Lnet/minecraft/unmapped/C_vidgpspy;FLnet/minecraft/unmapped/C_cnszsxvd;)V}
     * @mapping {@literal named renderStars Lnet/minecraft/client/render/SkyRenderer;renderStars(Lnet/minecraft/client/render/FogParameters;FLnet/minecraft/client/util/math/MatrixStack;)V}
     */
-   private void renderStars(FogParameters fog, float visibility, MatrixStack matrices) {
+   private void renderStars(FogParameters arg, float visibility, MatrixStack matrices) {
       Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack();
       matrix4fStack.pushMatrix();
       matrix4fStack.mul(matrices.peek().getModel());
@@ -273,7 +273,7 @@
       this.stars.bind();
       this.stars.draw(matrix4fStack, RenderSystem.getProjectionMatrix(), RenderSystem.getShader());
       VertexBuffer.unbind();
-      RenderSystem.setShaderFog(fog);
+      RenderSystem.setShaderFog(arg);
       RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
       RenderSystem.disableBlend();
       RenderSystem.defaultBlendFunc();
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-23 04:07:51.545258214 +0000
+++ namedSrc/net/minecraft/client/texture/SpriteAtlasTexture.java	2024-08-23 04:06:41.796582287 +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-23 04:07:51.313255907 +0000
+++ namedSrc/net/minecraft/nbt/NbtIo.java	2024-08-23 04:06:41.528579600 +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-23 04:07:51.373256504 +0000
+++ namedSrc/net/minecraft/util/DelegatingDataOutput.java	2024-08-23 04:06:41.596580282 +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.