Skip to content

Commit

Permalink
Some rendering mappings (#476)
Browse files Browse the repository at this point in the history
* Some rendering mappings

* Update mappings/net/minecraft/client/render/model/BakedModelManager.mapping

* Update BuiltChunkStorage.mapping
  • Loading branch information
OroArmor authored Aug 9, 2023
1 parent 676b880 commit 028b37f
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 2 deletions.
7 changes: 7 additions & 0 deletions mappings/com/mojang/blaze3d/font/SpaceFont.mapping
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
CLASS net/minecraft/unmapped/C_auoqqcdl com/mojang/blaze3d/font/SpaceFont
FIELD f_qzendodg emptyGlyphs Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
METHOD <init> (Ljava/util/Map;)V
ARG 1 advances
METHOD m_wdqmreap (Ljava/lang/Integer;Ljava/lang/Float;)V
ARG 1 codepoint
ARG 2 advance
CLASS C_rmisfmyo SpaceFontTypeProvider
FIELD f_mqfzdjwl CODEC Lcom/mojang/serialization/MapCodec;
METHOD m_zesazefp (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
18 changes: 18 additions & 0 deletions mappings/com/mojang/blaze3d/platform/GlStateManager.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,15 @@ CLASS com/mojang/blaze3d/platform/GlStateManager com/mojang/blaze3d/platform/GlS
ARG 6 format
ARG 7 type
ARG 8 pixels
METHOD _upload (IIIIILnet/minecraft/unmapped/C_ayikuhxa$C_pfzicqtf;Ljava/nio/IntBuffer;Ljava/util/function/Consumer;)V
ARG 0 mipLevels
ARG 1 xOffset
ARG 2 yOffset
ARG 3 width
ARG 4 height
ARG 5 format
ARG 6 pixels
ARG 7 pixelConsumer
METHOD _vertexAttribIPointer _vertexAttribIPointer (IIIIJ)V
ARG 0 index
ARG 1 size
Expand Down Expand Up @@ -358,6 +367,15 @@ CLASS com/mojang/blaze3d/platform/GlStateManager com/mojang/blaze3d/platform/GlS
ARG 0 light0
ARG 1 light1
ARG 2 modelMatrix
METHOD upload (IIIIILnet/minecraft/unmapped/C_ayikuhxa$C_pfzicqtf;Ljava/nio/IntBuffer;Ljava/util/function/Consumer;)V
ARG 0 mipLevels
ARG 1 xOffset
ARG 2 yOffset
ARG 3 width
ARG 4 height
ARG 5 format
ARG 6 pixels
ARG 7 pixelConsumer
CLASS C_hfcoodvl LogicOp
FIELD f_yldbwizx value I
METHOD <init> (Ljava/lang/String;II)V
Expand Down
11 changes: 11 additions & 0 deletions mappings/com/mojang/blaze3d/texture/TextureUtil.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ CLASS com/mojang/blaze3d/platform/TextureUtil com/mojang/blaze3d/texture/Texture
ARG 4 height
METHOD readResource readResource (Ljava/io/InputStream;)Ljava/nio/ByteBuffer;
ARG 0 inputStream
METHOD readResource (Ljava/nio/channels/ReadableByteChannel;I)Ljava/nio/ByteBuffer;
ARG 0 bytes
ARG 1 defaultSize
METHOD releaseTextureId releaseTextureId (I)V
ARG 0 id
METHOD writeAsPNG writeAsPNG (Ljava/nio/file/Path;Ljava/lang/String;IIII)V
Expand All @@ -39,3 +42,11 @@ CLASS com/mojang/blaze3d/platform/TextureUtil com/mojang/blaze3d/texture/Texture
ARG 3 mipLevels
ARG 4 width
ARG 5 height
METHOD writeAsPNG (Ljava/nio/file/Path;Ljava/lang/String;IIIILjava/util/function/IntUnaryOperator;)V
ARG 0 path
ARG 1 imageName
ARG 2 id
ARG 3 mipLevels
ARG 4 width
ARG 5 height
ARG 6 function
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ CLASS net/minecraft/unmapped/C_hfcesdco com/mojang/blaze3d/vertex/OverlayVertexC
FIELD f_tpagfjwz scale F
FIELD f_trigfwfe normalY F
FIELD f_vpohkwow z F
METHOD <init> (Lnet/minecraft/unmapped/C_igthdzux;Lorg/joml/Matrix4f;Lorg/joml/Matrix3f;F)V
ARG 2 cameraMatrix
ARG 3 normalMatrix
METHOD m_escfrycr reset ()V
13 changes: 13 additions & 0 deletions mappings/net/minecraft/client/render/BuiltChunkStorage.mapping
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
CLASS net/minecraft/unmapped/C_rqhfsngs net/minecraft/client/render/BuiltChunkStorage
FIELD f_afwynqyz viewDistance I
FIELD f_gqsafriw worldRenderer Lnet/minecraft/unmapped/C_sfkkabhx;
FIELD f_jiixbeeb xGridSections I
FIELD f_mlshnjmi zGridSections I
FIELD f_ugpffsia yGridSections I
FIELD f_ypmjrpkj world Lnet/minecraft/unmapped/C_cdctfzbn;
METHOD <init> (Lnet/minecraft/unmapped/C_sjynkhfr;Lnet/minecraft/unmapped/C_cdctfzbn;ILnet/minecraft/unmapped/C_sfkkabhx;)V
ARG 3 viewDistance
METHOD m_flvtwfft clear ()V
METHOD m_lzwczkxc getViewDistance ()I
METHOD m_paxdewur createSections (Lnet/minecraft/unmapped/C_sjynkhfr;)V
METHOD m_rxnslrfy updateCameraPosition (DD)V
ARG 1 x
ARG 3 z
Expand All @@ -10,5 +18,10 @@ CLASS net/minecraft/unmapped/C_rqhfsngs net/minecraft/client/render/BuiltChunkSt
ARG 2 y
ARG 3 z
ARG 4 important
METHOD m_thmsuaoy getWorld ()Lnet/minecraft/unmapped/C_qpninoyb;
METHOD m_uqgbrzua setViewDistance (I)V
ARG 1 viewDistance
METHOD m_xexmfpvq index (III)I
ARG 1 x
ARG 2 y
ARG 3 z
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ CLASS net/minecraft/unmapped/C_wosoicga net/minecraft/client/render/model/BakedM
ARG 2 colorMap
ARG 3 mipmap
METHOD close close ()V
METHOD m_aehsgbwe (Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;Ljava/lang/Void;)Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;
ARG 1 state
METHOD m_agtdwviq (Ljava/util/List;)Ljava/util/Map;
ARG 0 _list
METHOD m_ecxafngp (Ljava/util/concurrent/Executor;Ljava/util/Map;)Ljava/util/concurrent/CompletionStage;
ARG 1 resources
METHOD m_ektbikha (Lnet/minecraft/unmapped/C_djlixbky;)Ljava/lang/String;
ARG 0 material
METHOD m_elihpnce (Lnet/minecraft/unmapped/C_eslcbfsq;Ljava/util/Map;Ljava/util/Map;)Lnet/minecraft/unmapped/C_gjnplkfz;
ARG 2 models
ARG 3 blockStates
METHOD m_ewpgilcu loadBlockModels (Lnet/minecraft/unmapped/C_tmnrpasf;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
ARG 1 executor
METHOD m_fdknnkhy getModel (Lnet/minecraft/unmapped/C_jcudnsmp;)Lnet/minecraft/unmapped/C_nnhmhkbv;
Expand All @@ -25,20 +34,35 @@ CLASS net/minecraft/unmapped/C_wosoicga net/minecraft/client/render/model/BakedM
ARG 1 mipmapLevels
METHOD m_jxdqxolx loadBlockStates (Lnet/minecraft/unmapped/C_tmnrpasf;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
ARG 1 executor
METHOD m_lfsclgoe (I)[Ljava/util/concurrent/CompletableFuture;
ARG 0 i
METHOD m_lwjqxwnu getMissingModel ()Lnet/minecraft/unmapped/C_nnhmhkbv;
METHOD m_mpabbjcv getBlockModels ()Lnet/minecraft/unmapped/C_ovutgaod;
METHOD m_mzfbpfdl (Ljava/util/concurrent/Executor;Ljava/util/Map;)Ljava/util/concurrent/CompletionStage;
ARG 1 resources
METHOD m_nrawhhyn shouldRerender (Lnet/minecraft/unmapped/C_txtbiemp;Lnet/minecraft/unmapped/C_txtbiemp;)Z
ARG 1 from
ARG 2 to
METHOD m_oppkkipg (Lnet/minecraft/unmapped/C_eslcbfsq;Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;)V
ARG 2 reloadState
METHOD m_palizatf (Ljava/util/List;)Ljava/util/Map;
ARG 0 _list
METHOD m_pfipxvmw apply (Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;Lnet/minecraft/unmapped/C_eslcbfsq;)V
ARG 1 reloadSTate
ARG 1 reloadState
METHOD m_qzgtnlsp (I)[Ljava/util/concurrent/CompletableFuture;
ARG 0 i
METHOD m_raqoqmgu (Lnet/minecraft/unmapped/C_eslcbfsq;Ljava/util/Map;Ljava/util/concurrent/CompletableFuture;Ljava/lang/Void;)Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;
ARG 4 reloadState
METHOD m_ruwcwoip (Ljava/util/Map$Entry;)Lnet/minecraft/unmapped/C_pzkdqusv$C_hddnhiwp;
ARG 0 entry
METHOD m_uozkvopc (Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;)Ljava/util/concurrent/CompletionStage;
ARG 0 reloadState
METHOD m_vfuorvoi (Lnet/minecraft/unmapped/C_ncpywfca;Ljava/util/Collection;)V
ARG 0 modelId
ARG 1 textures
ARG 1 materials
METHOD m_xvhnauan (Ljava/util/Map;Lcom/google/common/collect/Multimap;Lnet/minecraft/unmapped/C_ncpywfca;Lnet/minecraft/unmapped/C_djlixbky;)Lnet/minecraft/unmapped/C_uflrwbwt;
ARG 2 modelId
ARG 3 material
METHOD m_xzgzhjbz getAtlas (Lnet/minecraft/unmapped/C_ncpywfca;)Lnet/minecraft/unmapped/C_qwirmgcf;
ARG 1 id
CLASS C_mogtdkcx ReloadState
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CLASS net/minecraft/unmapped/C_gjnplkfz net/minecraft/client/render/model/ModelL
ARG 3 modelResources
ARG 4 blockStateResources
METHOD m_bcuamafh (Lnet/minecraft/unmapped/C_ncpywfca;Lnet/minecraft/unmapped/C_ezfeikaq;)V
ARG 1 id
ARG 2 stateManager
METHOD m_cfqidkii (Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;)V
ARG 0 map
Expand Down Expand Up @@ -129,6 +130,9 @@ CLASS net/minecraft/unmapped/C_gjnplkfz net/minecraft/client/render/model/ModelL
FIELD f_cjvdgfpd spriteGetter Ljava/util/function/Function;
METHOD <init> (Lnet/minecraft/unmapped/C_gjnplkfz;Ljava/util/function/BiFunction;Lnet/minecraft/unmapped/C_ncpywfca;)V
ARG 2 spriteGenerator
ARG 3 id
METHOD m_rlqcwykb (Ljava/util/function/BiFunction;Lnet/minecraft/unmapped/C_ncpywfca;Lnet/minecraft/unmapped/C_djlixbky;)Lnet/minecraft/unmapped/C_uflrwbwt;
ARG 2 material
CLASS C_uyeglnzd ModelLoaderException
METHOD <init> (Ljava/lang/String;)V
ARG 1 message
Expand Down

1 comment on commit 028b37f

@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 028b37f, 8 file(s) were updated with 117 line(s) added and 100 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/com/mojang/blaze3d/font/SpaceFont.java namedSrc/com/mojang/blaze3d/font/SpaceFont.java
--- namedTargetSrc/com/mojang/blaze3d/font/SpaceFont.java	2023-08-09 15:41:57.830933369 +0000
+++ namedSrc/com/mojang/blaze3d/font/SpaceFont.java	2023-08-09 15:40:05.006165563 +0000
@@ -29,11 +29,12 @@
    private final Int2ObjectMap<Glyph.EmptyGlyph> emptyGlyphs;
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed <init> Lnet/minecraft/unmapped/C_auoqqcdl;<init>(Ljava/util/Map;)V}
+    * @mapping {@literal named <init> Lcom/mojang/blaze3d/font/SpaceFont;<init>(Ljava/util/Map;)V}
     */
-   public SpaceFont(Map<Integer, Float> map) {
-      this.emptyGlyphs = new Int2ObjectOpenHashMap<>(map.size());
-      map.forEach((integer, arg) -> this.emptyGlyphs.put(integer.intValue(), () -> arg));
+   public SpaceFont(Map<Integer, Float> advances) {
+      this.emptyGlyphs = new Int2ObjectOpenHashMap<>(advances.size());
+      advances.forEach((codepoint, advance) -> this.emptyGlyphs.put(codepoint.intValue(), () -> advance));
    }
 
    /**
diff -bur namedTargetSrc/com/mojang/blaze3d/platform/GlStateManager.java namedSrc/com/mojang/blaze3d/platform/GlStateManager.java
--- namedTargetSrc/com/mojang/blaze3d/platform/GlStateManager.java	2023-08-09 15:41:57.870936467 +0000
+++ namedSrc/com/mojang/blaze3d/platform/GlStateManager.java	2023-08-09 15:40:05.050168943 +0000
@@ -978,29 +978,35 @@
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed upload Lcom/mojang/blaze3d/platform/GlStateManager;upload(IIIIILnet/minecraft/unmapped/C_ayikuhxa$C_pfzicqtf;Ljava/nio/IntBuffer;Ljava/util/function/Consumer;)V}
+    * @mapping {@literal named upload Lcom/mojang/blaze3d/platform/GlStateManager;upload(IIIIILcom/mojang/blaze3d/texture/NativeImage$Format;Ljava/nio/IntBuffer;Ljava/util/function/Consumer;)V}
     */
-   public static void upload(int i, int j, int k, int l, int m, NativeImage.Format arg, IntBuffer intBuffer, Consumer<IntBuffer> consumer) {
+   public static void upload(
+      int mipLevels, int xOffset, int yOffset, int width, int height, NativeImage.Format format, IntBuffer pixels, Consumer<IntBuffer> pixelConsumer
+   ) {
       if (!RenderSystem.isOnRenderThreadOrInit()) {
-         RenderSystem.recordRenderCall(() -> _upload(i, j, k, l, m, arg, intBuffer, consumer));
+         RenderSystem.recordRenderCall(() -> _upload(mipLevels, xOffset, yOffset, width, height, format, pixels, pixelConsumer));
       } else {
-         _upload(i, j, k, l, m, arg, intBuffer, consumer);
+         _upload(mipLevels, xOffset, yOffset, width, height, format, pixels, pixelConsumer);
       }
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed _upload Lcom/mojang/blaze3d/platform/GlStateManager;_upload(IIIIILnet/minecraft/unmapped/C_ayikuhxa$C_pfzicqtf;Ljava/nio/IntBuffer;Ljava/util/function/Consumer;)V}
+    * @mapping {@literal named _upload Lcom/mojang/blaze3d/platform/GlStateManager;_upload(IIIIILcom/mojang/blaze3d/texture/NativeImage$Format;Ljava/nio/IntBuffer;Ljava/util/function/Consumer;)V}
     */
-   private static void _upload(int i, int j, int k, int l, int m, NativeImage.Format arg, IntBuffer intBuffer, Consumer<IntBuffer> consumer) {
+   private static void _upload(
+      int mipLevels, int xOffset, int yOffset, int width, int height, NativeImage.Format format, IntBuffer pixels, Consumer<IntBuffer> pixelConsumer
+   ) {
       try {
          RenderSystem.assertOnRenderThreadOrInit();
-         _pixelStore(GL11.GL_UNPACK_ROW_LENGTH, l);
+         _pixelStore(GL11.GL_UNPACK_ROW_LENGTH, width);
          _pixelStore(GL11.GL_UNPACK_SKIP_PIXELS, 0);
          _pixelStore(GL11.GL_UNPACK_SKIP_ROWS, 0);
-         arg.setUnpackAlignment();
-         GL11.glTexSubImage2D(3553, i, j, k, l, m, arg.getPixelDataFormat(), 5121, intBuffer);
+         format.setUnpackAlignment();
+         GL11.glTexSubImage2D(3553, mipLevels, xOffset, yOffset, width, height, format.getPixelDataFormat(), 5121, pixels);
       } finally {
-         consumer.accept(intBuffer);
+         pixelConsumer.accept(pixels);
       }
    }
 
diff -bur namedTargetSrc/com/mojang/blaze3d/texture/TextureUtil.java namedSrc/com/mojang/blaze3d/texture/TextureUtil.java
--- namedTargetSrc/com/mojang/blaze3d/texture/TextureUtil.java	2023-08-09 15:41:57.862935847 +0000
+++ namedSrc/com/mojang/blaze3d/texture/TextureUtil.java	2023-08-09 15:40:05.042168329 +0000
@@ -135,13 +135,14 @@
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed readResource Lcom/mojang/blaze3d/platform/TextureUtil;readResource(Ljava/nio/channels/ReadableByteChannel;I)Ljava/nio/ByteBuffer;}
+    * @mapping {@literal named readResource Lcom/mojang/blaze3d/texture/TextureUtil;readResource(Ljava/nio/channels/ReadableByteChannel;I)Ljava/nio/ByteBuffer;}
     */
-   private static ByteBuffer readResource(ReadableByteChannel readableByteChannel, int i) throws IOException {
-      ByteBuffer byteBuffer = MemoryUtil.memAlloc(i);
+   private static ByteBuffer readResource(ReadableByteChannel bytes, int defaultSize) throws IOException {
+      ByteBuffer byteBuffer = MemoryUtil.memAlloc(defaultSize);
 
       try {
-         while (readableByteChannel.read(byteBuffer) != -1) {
+         while (bytes.read(byteBuffer) != -1) {
             if (!byteBuffer.hasRemaining()) {
                byteBuffer = MemoryUtil.memRealloc(byteBuffer, byteBuffer.capacity() * 2);
             }
@@ -163,23 +164,24 @@
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed writeAsPNG Lcom/mojang/blaze3d/platform/TextureUtil;writeAsPNG(Ljava/nio/file/Path;Ljava/lang/String;IIIILjava/util/function/IntUnaryOperator;)V}
+    * @mapping {@literal named writeAsPNG Lcom/mojang/blaze3d/texture/TextureUtil;writeAsPNG(Ljava/nio/file/Path;Ljava/lang/String;IIIILjava/util/function/IntUnaryOperator;)V}
     */
-   public static void writeAsPNG(Path path, String string, int i, int j, int k, int l, @Nullable IntUnaryOperator intUnaryOperator) {
+   public static void writeAsPNG(Path path, String imageName, int id, int mipLevels, int width, int height, @Nullable IntUnaryOperator function) {
       RenderSystem.assertOnRenderThread();
-      bind(i);
+      bind(id);
 
-      for (int m = 0; m <= j; ++m) {
-         int n = k >> m;
-         int o = l >> m;
+      for (int m = 0; m <= mipLevels; ++m) {
+         int n = width >> m;
+         int o = height >> m;
 
          try (NativeImage lv = new NativeImage(n, o, false)) {
             lv.loadFromTextureImage(m, false);
-            if (intUnaryOperator != null) {
-               lv.applyFunction(intUnaryOperator);
+            if (function != null) {
+               lv.applyFunction(function);
             }
 
-            Path path2 = path.resolve(string + "_" + m + ".png");
+            Path path2 = path.resolve(imageName + "_" + m + ".png");
             lv.writeFile(path2);
             LOGGER.debug("Exported png to: {}", path2.toAbsolutePath());
          } catch (IOException var15) {
diff -bur namedTargetSrc/com/mojang/blaze3d/vertex/OverlayVertexConsumer.java namedSrc/com/mojang/blaze3d/vertex/OverlayVertexConsumer.java
--- namedTargetSrc/com/mojang/blaze3d/vertex/OverlayVertexConsumer.java	2023-08-09 15:41:57.834933679 +0000
+++ namedSrc/com/mojang/blaze3d/vertex/OverlayVertexConsumer.java	2023-08-09 15:40:05.010165870 +0000
@@ -84,10 +84,10 @@
     * @mapping {@literal hashed <init> Lnet/minecraft/unmapped/C_hfcesdco;<init>(Lnet/minecraft/unmapped/C_igthdzux;Lorg/joml/Matrix4f;Lorg/joml/Matrix3f;F)V}
     * @mapping {@literal named <init> Lcom/mojang/blaze3d/vertex/OverlayVertexConsumer;<init>(Lcom/mojang/blaze3d/vertex/VertexConsumer;Lorg/joml/Matrix4f;Lorg/joml/Matrix3f;F)V}
     */
-   public OverlayVertexConsumer(VertexConsumer delegate, Matrix4f matrix4f, Matrix3f matrix3f, float scale) {
+   public OverlayVertexConsumer(VertexConsumer delegate, Matrix4f cameraMatrix, Matrix3f normalMatrix, float scale) {
       this.delegate = delegate;
-      this.cameraInverseMatrix = new Matrix4f(matrix4f).invert();
-      this.normalInverseMatrix = new Matrix3f(matrix3f).invert();
+      this.cameraInverseMatrix = new Matrix4f(cameraMatrix).invert();
+      this.normalInverseMatrix = new Matrix3f(normalMatrix).invert();
       this.scale = scale;
       this.reset();
    }
diff -bur namedTargetSrc/net/minecraft/client/render/BuiltChunkStorage.java namedSrc/net/minecraft/client/render/BuiltChunkStorage.java
--- namedTargetSrc/net/minecraft/client/render/BuiltChunkStorage.java	2023-08-09 15:41:57.866936157 +0000
+++ namedSrc/net/minecraft/client/render/BuiltChunkStorage.java	2023-08-09 15:40:05.046168636 +0000
@@ -27,21 +27,25 @@
     */
    protected final World world;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_ugpffsia Lnet/minecraft/unmapped/C_rqhfsngs;f_ugpffsia:I}
+    * @mapping {@literal named yGridSections Lnet/minecraft/client/render/BuiltChunkStorage;yGridSections:I}
     */
-   protected int f_ugpffsia;
+   protected int yGridSections;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_jiixbeeb Lnet/minecraft/unmapped/C_rqhfsngs;f_jiixbeeb:I}
+    * @mapping {@literal named xGridSections Lnet/minecraft/client/render/BuiltChunkStorage;xGridSections:I}
     */
-   protected int f_jiixbeeb;
+   protected int xGridSections;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_mlshnjmi Lnet/minecraft/unmapped/C_rqhfsngs;f_mlshnjmi:I}
+    * @mapping {@literal named zGridSections Lnet/minecraft/client/render/BuiltChunkStorage;zGridSections:I}
     */
-   protected int f_mlshnjmi;
+   protected int zGridSections;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_afwynqyz Lnet/minecraft/unmapped/C_rqhfsngs;f_afwynqyz:I}
+    * @mapping {@literal named viewDistance Lnet/minecraft/client/render/BuiltChunkStorage;viewDistance:I}
     */
-   private int f_afwynqyz;
+   private int viewDistance;
    /**
     * Mapping not found
     */
@@ -51,27 +55,28 @@
     * @mapping {@literal hashed <init> Lnet/minecraft/unmapped/C_rqhfsngs;<init>(Lnet/minecraft/unmapped/C_sjynkhfr;Lnet/minecraft/unmapped/C_cdctfzbn;ILnet/minecraft/unmapped/C_sfkkabhx;)V}
     * @mapping {@literal named <init> Lnet/minecraft/client/render/BuiltChunkStorage;<init>(Lnet/minecraft/unmapped/C_sjynkhfr;Lnet/minecraft/world/World;ILnet/minecraft/client/render/WorldRenderer;)V}
     */
-   public BuiltChunkStorage(C_sjynkhfr arg, World world, int i, WorldRenderer worldRenderer) {
+   public BuiltChunkStorage(C_sjynkhfr arg, World world, int viewDistance, WorldRenderer worldRenderer) {
       this.worldRenderer = worldRenderer;
       this.world = world;
-      this.setViewDistance(i);
-      this.m_paxdewur(arg);
+      this.setViewDistance(viewDistance);
+      this.createSections(arg);
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed m_paxdewur Lnet/minecraft/unmapped/C_rqhfsngs;m_paxdewur(Lnet/minecraft/unmapped/C_sjynkhfr;)V}
+    * @mapping {@literal named createSections Lnet/minecraft/client/render/BuiltChunkStorage;createSections(Lnet/minecraft/unmapped/C_sjynkhfr;)V}
     */
-   protected void m_paxdewur(C_sjynkhfr arg) {
+   protected void createSections(C_sjynkhfr arg) {
       if (!MinecraftClient.getInstance().isOnThread()) {
          throw new IllegalStateException("createSections called from wrong thread: " + Thread.currentThread().getName());
       } else {
-         int i = this.f_jiixbeeb * this.f_ugpffsia * this.f_mlshnjmi;
+         int i = this.xGridSections * this.yGridSections * this.zGridSections;
          this.f_llzkkcwf = new C_sjynkhfr.C_exmylrbc[i];
 
-         for (int j = 0; j < this.f_jiixbeeb; ++j) {
-            for (int k = 0; k < this.f_ugpffsia; ++k) {
-               for (int l = 0; l < this.f_mlshnjmi; ++l) {
-                  int m = this.m_xexmfpvq(j, k, l);
+         for (int j = 0; j < this.xGridSections; ++j) {
+            for (int k = 0; k < this.yGridSections; ++k) {
+               for (int l = 0; l < this.zGridSections; ++l) {
+                  int m = this.index(j, k, l);
                   this.f_llzkkcwf[m] = arg.new C_exmylrbc(m, j * 16, this.world.getBottomY() + k * 16, l * 16);
                }
             }
@@ -90,10 +95,11 @@
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed m_xexmfpvq Lnet/minecraft/unmapped/C_rqhfsngs;m_xexmfpvq(III)I}
+    * @mapping {@literal named index Lnet/minecraft/client/render/BuiltChunkStorage;index(III)I}
     */
-   private int m_xexmfpvq(int i, int j, int k) {
-      return (k * this.f_ugpffsia + j) * this.f_jiixbeeb + i;
+   private int index(int x, int y, int z) {
+      return (z * this.yGridSections + y) * this.xGridSections + x;
    }
 
    /**
@@ -102,23 +108,25 @@
     */
    protected void setViewDistance(int viewDistance) {
       int j = viewDistance * 2 + 1;
-      this.f_jiixbeeb = j;
-      this.f_ugpffsia = this.world.countVerticalSections();
-      this.f_mlshnjmi = j;
-      this.f_afwynqyz = viewDistance;
+      this.xGridSections = j;
+      this.yGridSections = this.world.countVerticalSections();
+      this.zGridSections = j;
+      this.viewDistance = viewDistance;
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed m_lzwczkxc Lnet/minecraft/unmapped/C_rqhfsngs;m_lzwczkxc()I}
+    * @mapping {@literal named getViewDistance Lnet/minecraft/client/render/BuiltChunkStorage;getViewDistance()I}
     */
-   public int m_lzwczkxc() {
-      return this.f_afwynqyz;
+   public int getViewDistance() {
+      return this.viewDistance;
    }
 
    /**
-    * Mapping not found
+    * @mapping {@literal hashed m_thmsuaoy Lnet/minecraft/unmapped/C_rqhfsngs;m_thmsuaoy()Lnet/minecraft/unmapped/C_qpninoyb;}
+    * @mapping {@literal named getWorld Lnet/minecraft/client/render/BuiltChunkStorage;getWorld()Lnet/minecraft/world/HeightLimitView;}
     */
-   public HeightLimitView m_thmsuaoy() {
+   public HeightLimitView getWorld() {
       return this.world;
    }
 
@@ -130,19 +138,19 @@
       int i = MathHelper.ceil(x);
       int j = MathHelper.ceil(z);
 
-      for (int k = 0; k < this.f_jiixbeeb; ++k) {
-         int l = this.f_jiixbeeb * 16;
+      for (int k = 0; k < this.xGridSections; ++k) {
+         int l = this.xGridSections * 16;
          int m = i - 8 - l / 2;
          int n = m + Math.floorMod(k * 16 - m, l);
 
-         for (int o = 0; o < this.f_mlshnjmi; ++o) {
-            int p = this.f_mlshnjmi * 16;
+         for (int o = 0; o < this.zGridSections; ++o) {
+            int p = this.zGridSections * 16;
             int q = j - 8 - p / 2;
             int r = q + Math.floorMod(o * 16 - q, p);
 
-            for (int s = 0; s < this.f_ugpffsia; ++s) {
+            for (int s = 0; s < this.yGridSections; ++s) {
                int t = this.world.getBottomY() + s * 16;
-               C_sjynkhfr.C_exmylrbc lv = this.f_llzkkcwf[this.m_xexmfpvq(k, s, o)];
+               C_sjynkhfr.C_exmylrbc lv = this.f_llzkkcwf[this.index(k, s, o)];
                BlockPos lv2 = lv.m_apvthafb();
                if (n != lv2.getX() || t != lv2.getY() || r != lv2.getZ()) {
                   lv.m_ltblhvsd(n, t, r);
@@ -157,10 +165,10 @@
     * @mapping {@literal named scheduleRebuild Lnet/minecraft/client/render/BuiltChunkStorage;scheduleRebuild(IIIZ)V}
     */
    public void scheduleRebuild(int x, int y, int z, boolean important) {
-      int l = Math.floorMod(x, this.f_jiixbeeb);
-      int m = Math.floorMod(y - this.world.getBottomSectionCoord(), this.f_ugpffsia);
-      int n = Math.floorMod(z, this.f_mlshnjmi);
-      C_sjynkhfr.C_exmylrbc lv = this.f_llzkkcwf[this.m_xexmfpvq(l, m, n)];
+      int l = Math.floorMod(x, this.xGridSections);
+      int m = Math.floorMod(y - this.world.getBottomSectionCoord(), this.yGridSections);
+      int n = Math.floorMod(z, this.zGridSections);
+      C_sjynkhfr.C_exmylrbc lv = this.f_llzkkcwf[this.index(l, m, n)];
       lv.m_ggtdhlyn(important);
    }
 
@@ -171,10 +179,10 @@
    @Nullable
    protected C_sjynkhfr.C_exmylrbc m_jpnxgjcl(BlockPos pos) {
       int i = MathHelper.floorDiv(pos.getY() - this.world.getBottomY(), 16);
-      if (i >= 0 && i < this.f_ugpffsia) {
-         int j = MathHelper.floorMod(MathHelper.floorDiv(pos.getX(), 16), this.f_jiixbeeb);
-         int k = MathHelper.floorMod(MathHelper.floorDiv(pos.getZ(), 16), this.f_mlshnjmi);
-         return this.f_llzkkcwf[this.m_xexmfpvq(j, i, k)];
+      if (i >= 0 && i < this.yGridSections) {
+         int j = MathHelper.floorMod(MathHelper.floorDiv(pos.getX(), 16), this.xGridSections);
+         int k = MathHelper.floorMod(MathHelper.floorDiv(pos.getZ(), 16), this.zGridSections);
+         return this.f_llzkkcwf[this.index(j, i, k)];
       } else {
          return null;
       }
diff -bur namedTargetSrc/net/minecraft/client/render/model/BakedModelManager.java namedSrc/net/minecraft/client/render/model/BakedModelManager.java
--- namedTargetSrc/net/minecraft/client/render/model/BakedModelManager.java	2023-08-09 15:41:57.722925006 +0000
+++ namedSrc/net/minecraft/client/render/model/BakedModelManager.java	2023-08-09 15:40:04.874155420 +0000
@@ -164,14 +164,14 @@
       CompletableFuture<Map<Identifier, JsonUnbakedModel>> completableFuture = loadBlockModels(manager, prepareExecutor);
       CompletableFuture<Map<Identifier, List<ModelLoader.LoadedJson>>> completableFuture2 = loadBlockStates(manager, prepareExecutor);
       CompletableFuture<ModelLoader> completableFuture3 = completableFuture.thenCombineAsync(
-         completableFuture2, (mapx, map2) -> new ModelLoader(this.colorMap, prepareProfiler, mapx, map2), prepareExecutor
+         completableFuture2, (models, blockStates) -> new ModelLoader(this.colorMap, prepareProfiler, models, blockStates), prepareExecutor
       );
       Map<Identifier, CompletableFuture<SpriteAtlasManager.StitchResult>> map = this.atlasManager.scheduleLoad(manager, this.mipmapLevels, prepareExecutor);
       return CompletableFuture.allOf(
             (CompletableFuture[])Stream.concat(map.values().stream(), Stream.of(completableFuture3)).toArray(i -> new CompletableFuture[i])
          )
          .thenApplyAsync(
-            arg2 -> this.loadModels(
+            reloadState -> this.loadModels(
                   prepareProfiler,
                   (Map<Identifier, SpriteAtlasManager.StitchResult>)map.entrySet()
                      .stream()
@@ -180,9 +180,9 @@
                ),
             prepareExecutor
          )
-         .thenCompose(arg -> arg.readyForUpload.thenApply(arg2 -> arg))
+         .thenCompose(reloadState -> reloadState.readyForUpload.thenApply(state -> reloadState))
          .thenCompose(synchronizer::whenPrepared)
-         .thenAcceptAsync(arg2 -> this.apply(arg2, applyProfiler), applyExecutor);
+         .thenAcceptAsync(reloadState -> this.apply(reloadState, applyProfiler), applyExecutor);
    }
 
    /**
@@ -228,7 +228,7 @@
                }
       
                return Util.combineSafe(list)
-                  .thenApply(listx -> (Map)listx.stream().filter(Objects::nonNull).collect(Collectors.toUnmodifiableMap(Pair::getFirst, Pair::getSecond)));
+                  .thenApply(_list -> (Map)_list.stream().filter(Objects::nonNull).collect(Collectors.toUnmodifiableMap(Pair::getFirst, Pair::getSecond)));
             }
          );
    }
@@ -280,7 +280,7 @@
                }
       
                return Util.combineSafe(list)
-                  .thenApply(listx -> (Map)listx.stream().filter(Objects::nonNull).collect(Collectors.toUnmodifiableMap(Pair::getFirst, Pair::getSecond)));
+                  .thenApply(_list -> (Map)_list.stream().filter(Objects::nonNull).collect(Collectors.toUnmodifiableMap(Pair::getFirst, Pair::getSecond)));
             }
          );
    }
@@ -293,24 +293,24 @@
       profiler.push("load");
       profiler.swap("baking");
       Multimap<Identifier, Material> multimap = HashMultimap.create();
-      modelLoader.bakeModels((modelId, arg2) -> {
-         SpriteAtlasManager.StitchResult lvx = (SpriteAtlasManager.StitchResult)atlases.get(arg2.getAtlasLocation());
-         Sprite lv2x = lvx.get(arg2.getTexture());
+      modelLoader.bakeModels((modelId, material) -> {
+         SpriteAtlasManager.StitchResult lvx = (SpriteAtlasManager.StitchResult)atlases.get(material.getAtlasLocation());
+         Sprite lv2x = lvx.get(material.getTexture());
          if (lv2x != null) {
             return lv2x;
          } else {
-            multimap.put(modelId, arg2);
+            multimap.put(modelId, material);
             return lvx.getMissing();
          }
       });
       multimap.asMap()
          .forEach(
-            (modelId, textures) -> LOGGER.warn(
+            (modelId, materials) -> LOGGER.warn(
                   "Missing textures in model {}:\n{}",
                   modelId,
-                  textures.stream()
+                  materials.stream()
                      .sorted(Material.COMPARATOR)
-                     .map(arg -> "    " + arg.getAtlasLocation() + ":" + arg.getTexture())
+                     .map(material -> "    " + material.getAtlasLocation() + ":" + material.getTexture())
                      .collect(Collectors.joining("\n"))
                )
          );
@@ -339,16 +339,16 @@
     * @mapping {@literal hashed m_pfipxvmw Lnet/minecraft/unmapped/C_wosoicga;m_pfipxvmw(Lnet/minecraft/unmapped/C_wosoicga$C_mogtdkcx;Lnet/minecraft/unmapped/C_eslcbfsq;)V}
     * @mapping {@literal named apply Lnet/minecraft/client/render/model/BakedModelManager;apply(Lnet/minecraft/client/render/model/BakedModelManager$ReloadState;Lnet/minecraft/util/profiler/Profiler;)V}
     */
-   private void apply(BakedModelManager.ReloadState reloadSTate, Profiler profiler) {
+   private void apply(BakedModelManager.ReloadState reloadState, Profiler profiler) {
       profiler.startTick();
       profiler.push("upload");
-      reloadSTate.atlasPreparations.values().forEach(SpriteAtlasManager.StitchResult::upload);
-      ModelLoader lv = reloadSTate.modelBakery;
+      reloadState.atlasPreparations.values().forEach(SpriteAtlasManager.StitchResult::upload);
+      ModelLoader lv = reloadState.modelBakery;
       this.models = lv.getBakedModelMap();
       this.stateLookup = lv.getStateLookup();
-      this.missingModel = reloadSTate.missingModel;
+      this.missingModel = reloadState.missingModel;
       profiler.swap("cache");
-      this.blockModelCache.setModels(reloadSTate.modelCache);
+      this.blockModelCache.setModels(reloadState.modelCache);
       profiler.pop();
       profiler.endTick();
    }
diff -bur namedTargetSrc/net/minecraft/client/render/model/ModelLoader.java namedSrc/net/minecraft/client/render/model/ModelLoader.java
--- namedTargetSrc/net/minecraft/client/render/model/ModelLoader.java	2023-08-09 15:41:57.734925935 +0000
+++ namedSrc/net/minecraft/client/render/model/ModelLoader.java	2023-08-09 15:40:04.890156649 +0000
@@ -326,7 +326,7 @@
       }
 
       profiler.swap("static_definitions");
-      STATIC_DEFINITIONS.forEach((arg, stateManager) -> stateManager.getStates().forEach(state -> this.addModel(BlockModels.getModelId(arg, state))));
+      STATIC_DEFINITIONS.forEach((id, stateManager) -> stateManager.getStates().forEach(state -> this.addModel(BlockModels.getModelId(id, state))));
       profiler.swap("blocks");
 
       for (Block lv : Registries.BLOCK) {
@@ -781,8 +781,8 @@
        * @mapping {@literal hashed <init> Lnet/minecraft/unmapped/C_gjnplkfz$C_qnxaydxn;<init>(Lnet/minecraft/unmapped/C_gjnplkfz;Ljava/util/function/BiFunction;Lnet/minecraft/unmapped/C_ncpywfca;)V}
        * @mapping {@literal named <init> Lnet/minecraft/client/render/model/ModelLoader$ModelLoaderBaker;<init>(Lnet/minecraft/client/render/model/ModelLoader;Ljava/util/function/BiFunction;Lnet/minecraft/util/Identifier;)V}
        */
-      ModelLoaderBaker(BiFunction<Identifier, Material, Sprite> spriteGenerator, Identifier arg2) {
-         this.spriteGetter = arg2x -> (Sprite)spriteGenerator.apply(arg2, arg2x);
+      ModelLoaderBaker(BiFunction<Identifier, Material, Sprite> spriteGenerator, Identifier id) {
+         this.spriteGetter = material -> (Sprite)spriteGenerator.apply(id, material);
       }
 
       /**
diff -bur namedTargetSrc/net/minecraft/unmapped/C_jnliocmw.java namedSrc/net/minecraft/unmapped/C_jnliocmw.java
--- namedTargetSrc/net/minecraft/unmapped/C_jnliocmw.java	2023-08-09 15:41:57.774929032 +0000
+++ namedSrc/net/minecraft/unmapped/C_jnliocmw.java	2023-08-09 15:40:04.930159723 +0000
@@ -263,12 +263,12 @@
       BlockPos lv2 = camera.getBlockPos();
       C_sjynkhfr.C_exmylrbc lv3 = this.f_ghbgvgzi.m_jpnxgjcl(lv2);
       if (lv3 == null) {
-         HeightLimitView lv4 = this.f_ghbgvgzi.m_thmsuaoy();
+         HeightLimitView lv4 = this.f_ghbgvgzi.getWorld();
          boolean bl = lv2.getY() > lv4.getBottomY();
          int j = bl ? lv4.getTopY() - 8 : lv4.getBottomY() + 8;
          int k = MathHelper.floor(lv.x / 16.0) * 16;
          int l = MathHelper.floor(lv.z / 16.0) * 16;
-         int m = this.f_ghbgvgzi.m_lzwczkxc();
+         int m = this.f_ghbgvgzi.getViewDistance();
          List<C_jnliocmw.C_rslogvyf> list = Lists.<C_jnliocmw.C_rslogvyf>newArrayList();
 
          for (int n = -m; n <= m; ++n) {
@@ -354,7 +354,7 @@
 
                   while (arg2.subtract(lv10).lengthSquared() > 3600.0) {
                      lv10 = lv10.add(lv11);
-                     HeightLimitView lv12 = this.f_ghbgvgzi.m_thmsuaoy();
+                     HeightLimitView lv12 = this.f_ghbgvgzi.getWorld();
                      if (lv10.y > (double)lv12.getTopY() || lv10.y < (double)lv12.getBottomY()) {
                         break;
                      }
@@ -400,7 +400,7 @@
       int j = ChunkSectionPos.getSectionCoord(arg.getZ());
       int k = ChunkSectionPos.getSectionCoord(arg2.getX());
       int l = ChunkSectionPos.getSectionCoord(arg2.getZ());
-      return C_niowvjqq.m_ocoubznz(i, j, this.f_ghbgvgzi.m_lzwczkxc(), k, l);
+      return C_niowvjqq.m_ocoubznz(i, j, this.f_ghbgvgzi.getViewDistance(), k, l);
    }
 
    /**
@@ -413,7 +413,7 @@
       if (!this.m_pabghxwa(pos, lv)) {
          return null;
       } else {
-         return MathHelper.abs(pos.getY() - lv.getY()) > this.f_ghbgvgzi.m_lzwczkxc() * 16 ? null : this.f_ghbgvgzi.m_jpnxgjcl(lv);
+         return MathHelper.abs(pos.getY() - lv.getY()) > this.f_ghbgvgzi.getViewDistance() * 16 ? null : this.f_ghbgvgzi.m_jpnxgjcl(lv);
       }
    }
 

Please sign in to comment.