From 4eca8e42f3b14ba5d00b862d6c076a10a7af69fd Mon Sep 17 00:00:00 2001 From: Kevin <92656833+kevinthegreat1@users.noreply.github.com> Date: Wed, 16 Oct 2024 06:31:46 -0400 Subject: [PATCH] Draw sprite fixes (#4027) * Update drawSprite methods to match scaling * Update draw sprite region * Fix lint --- .../minecraft/client/gui/DrawContext.mapping | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/mappings/net/minecraft/client/gui/DrawContext.mapping b/mappings/net/minecraft/client/gui/DrawContext.mapping index c55276150a..fb208bc120 100644 --- a/mappings/net/minecraft/client/gui/DrawContext.mapping +++ b/mappings/net/minecraft/client/gui/DrawContext.mapping @@ -367,24 +367,34 @@ CLASS net/minecraft/class_332 net/minecraft/client/gui/DrawContext ARG 6 height ARG 7 color METHOD method_52708 drawGuiTexture (Ljava/util/function/Function;Lnet/minecraft/class_2960;IIIIIIII)V + COMMENT Draws a textured rectangle from a region in a gui texture. + COMMENT + COMMENT

The width and height of the region are the same as + COMMENT the dimensions of the rectangle. ARG 1 renderLayers ARG 2 sprite ARG 3 textureWidth + COMMENT the width of the entire texture ARG 4 textureHeight + COMMENT the height of the entire texture ARG 5 u + COMMENT the x starting position of the region in the texture ARG 6 v + COMMENT the y starting position of the region in the texture ARG 7 x ARG 8 y ARG 9 width + COMMENT the width of the drawn rectangle and of the region in the texture ARG 10 height - METHOD method_52709 drawSprite (Ljava/util/function/Function;Lnet/minecraft/class_1058;IIII)V + COMMENT the height of the drawn rectangle and of the region in the texture + METHOD method_52709 drawSpriteStretched (Ljava/util/function/Function;Lnet/minecraft/class_1058;IIII)V ARG 1 renderLayers ARG 2 sprite ARG 3 x ARG 4 y ARG 5 width ARG 6 height - METHOD method_52710 drawSprite (Ljava/util/function/Function;Lnet/minecraft/class_1058;IIIII)V + METHOD method_52710 drawSpriteStretched (Ljava/util/function/Function;Lnet/minecraft/class_1058;IIIII)V ARG 1 renderLayers ARG 2 sprite ARG 3 x @@ -392,7 +402,7 @@ CLASS net/minecraft/class_332 net/minecraft/client/gui/DrawContext ARG 5 width ARG 6 height ARG 7 color - METHOD method_52711 drawSprite (Ljava/util/function/Function;Lnet/minecraft/class_1058;IIIIIIIII)V + METHOD method_52711 drawSpriteRegion (Ljava/util/function/Function;Lnet/minecraft/class_1058;IIIIIIIII)V ARG 1 renderLayers ARG 2 sprite ARG 3 textureWidth @@ -418,7 +428,7 @@ CLASS net/minecraft/class_332 net/minecraft/client/gui/DrawContext ARG 11 textureWidth ARG 12 textureHeight ARG 13 color - METHOD method_52713 drawSprite (Ljava/util/function/Function;Lnet/minecraft/class_1058;Lnet/minecraft/class_8690$class_8691;IIIII)V + METHOD method_52713 drawSpriteNineSliced (Ljava/util/function/Function;Lnet/minecraft/class_1058;Lnet/minecraft/class_8690$class_8691;IIIII)V ARG 1 renderLayers ARG 2 sprite ARG 3 nineSlice