@@ -161,10 +161,12 @@ public void render(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY
161
161
int xyDiff = (DEFAULT_ICON_SIZE - iconSize ) / 2 ;
162
162
163
163
if (this .frameResource != null ) {
164
+ guiGraphics .pose ().translate (0 ,0 ,1 );
164
165
MyRenderer .renderIconFrameWithBg (guiGraphics , this .frameResource , x + xyDiff , y + xyDiff , iconFrameSize , 0x64000000 );
165
166
}
166
167
167
168
if (bgIconResource != null ) {
169
+ guiGraphics .pose ().translate (0 ,0 ,1 );
168
170
MyRenderer .renderIcon (
169
171
guiGraphics ,
170
172
bgIconResource ,
@@ -175,6 +177,7 @@ public void render(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY
175
177
}
176
178
// item/unit icon
177
179
if (iconResource != null ) {
180
+ guiGraphics .pose ().translate (0 ,0 ,1 );
178
181
MyRenderer .renderIcon (
179
182
guiGraphics ,
180
183
iconResource ,
@@ -186,6 +189,7 @@ public void render(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY
186
189
if (this .hotkey != null ) {
187
190
String hotkeyStr = hotkey .buttonLabel ;
188
191
hotkeyStr = hotkeyStr .substring (0 ,Math .min (3 , hotkeyStr .length ()));
192
+ guiGraphics .pose ().translate (0 ,0 ,1 );
189
193
guiGraphics .drawCenteredString ( MC .font ,
190
194
hotkeyStr ,
191
195
x + iconSize + 8 - (hotkeyStr .length () * 4 ),
@@ -202,6 +206,7 @@ public void render(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY
202
206
203
207
if (frameResource != null ) {
204
208
ResourceLocation iconFrameSelectedResource = new ResourceLocation (ReignOfNether .MOD_ID , "textures/hud/icon_frame_selected.png" );
209
+ guiGraphics .pose ().translate (0 ,0 ,1 );
205
210
MyRenderer .renderIcon (
206
211
guiGraphics ,
207
212
iconFrameSelectedResource ,
@@ -212,6 +217,7 @@ public void render(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY
212
217
}
213
218
// light up on hover
214
219
if (isEnabled .get () && isMouseOver (mouseX , mouseY )) {
220
+ guiGraphics .pose ().translate (0 ,0 ,1 );
215
221
guiGraphics .fill ( // x1,y1, x2,y2,
216
222
x + xyDiff , y + xyDiff ,
217
223
x + xyDiff + iconFrameSize ,
@@ -224,6 +230,7 @@ public void render(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY
224
230
if (!isEnabled .get ())
225
231
greyHeightPx = 0 ;
226
232
233
+ guiGraphics .pose ().translate (0 ,0 ,1 );
227
234
guiGraphics .fill ( // x1,y1, x2,y2,
228
235
x + xyDiff ,
229
236
y + xyDiff + greyHeightPx ,
0 commit comments