@@ -82,10 +82,10 @@ protected void drawSlot(DrawContext context, Slot slot) {
8282 boolean bl2 = slot == ((HandledScreenAccessor )this ).getTouchDragSlotStart () && !((HandledScreenAccessor )this ).getTouchDragStack ().isEmpty () && !((HandledScreenAccessor )this ).getTouchIsRightClickDrag ();
8383 ItemStack itemStack2 = this .handler .getCursorStack ();
8484 String string = null ;
85- int k ;
8685
8786 // Check if this is a big slot
8887 boolean isBigSlot = slot instanceof BigSlot && ((BigSlot )slot ).isBigSlot ();
88+ int slotSize = isBigSlot ? 32 : 16 ; // 2x size for big slots
8989
9090 if (slot == ((HandledScreenAccessor )this ).getTouchDragSlotStart () && !((HandledScreenAccessor )this ).getTouchDragStack ().isEmpty () && ((HandledScreenAccessor )this ).getTouchIsRightClickDrag () && !itemStack .isEmpty ()) {
9191 itemStack = itemStack .copyWithCount (itemStack .getCount () / 2 );
@@ -96,7 +96,7 @@ protected void drawSlot(DrawContext context, Slot slot) {
9696
9797 if (ScreenHandler .canInsertItemIntoSlot (slot , itemStack2 , true ) && this .handler .canInsertIntoSlot (slot )) {
9898 bl = true ;
99- k = Math .min (itemStack2 .getMaxCount (), slot .getMaxItemCount (itemStack2 ));
99+ int k = Math .min (itemStack2 .getMaxCount (), slot .getMaxItemCount (itemStack2 ));
100100 int l = slot .getStack ().isEmpty () ? 0 : slot .getStack ().getCount ();
101101 int m = ScreenHandler .calculateStackSize (this .cursorDragSlots , ((HandledScreenAccessor )this ).getHeldButtonType (), itemStack2 ) + l ;
102102 if (m > k ) {
@@ -115,40 +115,53 @@ protected void drawSlot(DrawContext context, Slot slot) {
115115 if (itemStack .isEmpty () && slot .isEnabled ()) {
116116 Identifier identifier = slot .getBackgroundSprite ();
117117 if (identifier != null ) {
118- context .drawGuiTexture (RenderPipelines .GUI_TEXTURED , identifier , i , j , 16 , 16 );
118+ if (isBigSlot ) {
119+ // Scale the background texture for big slots
120+ context .getMatrices ().pushMatrix ();
121+ context .getMatrices ().translate (i , j );
122+ context .getMatrices ().scale (2.0f , 2.0f );
123+ context .drawGuiTexture (RenderPipelines .GUI_TEXTURED , identifier , 0 , 0 , 16 , 16 );
124+ context .getMatrices ().popMatrix ();
125+ } else {
126+ context .drawGuiTexture (RenderPipelines .GUI_TEXTURED , identifier , i , j , 16 , 16 );
127+ }
119128 bl2 = true ;
120129 }
121130 }
122131
123132 if (!bl2 ) {
124133 if (bl ) {
125- context .fill (i , j , i + 16 , j + 16 , -2130706433 );
134+ context .fill (i , j , i + slotSize , j + slotSize , -2130706433 );
126135 }
127136
128- k = slot .x + slot .y * this .backgroundWidth ;
137+ int k = slot .x + slot .y * this .backgroundWidth ;
138+
139+ if (isBigSlot ) {
140+ // Render big slot item with 2x scale
141+ context .getMatrices ().pushMatrix ();
142+ context .getMatrices ().translate (i -8 , j -8 );
143+ context .getMatrices ().scale (2.0f , 2.0f );
129144
130- // Handle big slots differently
131- if (isBigSlot && !itemStack .isEmpty ()) {
132- // Draw the item at 2x size (without matrix transformations)
133145 if (slot .disablesDynamicDisplay ()) {
134- context .drawItemWithoutEntity (itemStack , i , j , k );
146+ context .drawItemWithoutEntity (itemStack , 0 , 0 , k );
135147 } else {
136- context .drawItem (itemStack , i , j , k );
148+ context .drawItem (itemStack , 0 , 0 , k );
137149 }
138150
139- // Hide stack overlay for slots 1-60 (only draw for slots outside this range)
151+ // Draw overlay at scaled size
140152 if (slot .id < 1 || slot .id > 60 ) {
141- context .drawStackOverlay (this .textRenderer , itemStack , i , j , string );
153+ context .drawStackOverlay (this .textRenderer , itemStack , 0 , 0 , string );
142154 }
155+
156+ context .getMatrices ().popMatrix ();
143157 } else {
144- // Normal item rendering (unchanged)
158+ // Normal rendering for regular slots
145159 if (slot .disablesDynamicDisplay ()) {
146160 context .drawItemWithoutEntity (itemStack , i , j , k );
147161 } else {
148162 context .drawItem (itemStack , i , j , k );
149163 }
150164
151- // Hide stack overlay for slots 1-60 (only draw for slots outside this range)
152165 if (slot .id < 1 || slot .id > 60 ) {
153166 context .drawStackOverlay (this .textRenderer , itemStack , i , j , string );
154167 }
0 commit comments