24
24
@ Mixin (GuiIngame .class )
25
25
public abstract class MixinGuiInGame extends Gui {
26
26
27
- private static final int distance = -22 ;
27
+ private static final int DISTANCE = -22 ;
28
28
29
29
@ Shadow @ Final private static ResourceLocation WIDGETS_TEX_PATH ;
30
30
31
31
@ Shadow @ Final private Minecraft mc ;
32
32
@ Shadow protected abstract void renderHotbarItem (int p_184044_1_ , int p_184044_2_ , float p_184044_3_ , EntityPlayer player , ItemStack stack );
33
33
34
34
@ Inject (method = "renderHotbar" , at = @ At ("RETURN" ))
35
- private void drawTopHotbar (ScaledResolution sr , float partialTicks , CallbackInfo info ) {
35
+ private void drawTopHotbar (final ScaledResolution sr , final float partialTicks , final CallbackInfo info ) {
36
36
if (!LiteLoader .getInstance ().getMod (LiteModExtendedHotbar .class ).isEnabled ()) {
37
37
return ;
38
38
}
@@ -47,16 +47,16 @@ private void drawTopHotbar(ScaledResolution sr, float partialTicks, CallbackInfo
47
47
glColor4f (1.0F , 1.0F , 1.0F , 1.0F );
48
48
mc .getTextureManager ().bindTexture (WIDGETS_TEX_PATH );
49
49
glEnableBlend ();
50
- drawTexturedModalRect (i - 91 , sr .getScaledHeight () - 22 + distance , 0 , 0 , 182 , 22 );
50
+ drawTexturedModalRect (i - 91 , sr .getScaledHeight () - 22 + DISTANCE , 0 , 0 , 182 , 22 );
51
51
52
52
glEnableRescaleNormal ();
53
53
glBlendFuncSeparate (GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA , GL_ONE , GL_ZERO );
54
54
RenderHelper .enableGUIStandardItemLighting ();
55
55
56
56
for (int l = 0 ; l < 9 ; ++l ) {
57
57
// Anyone like magic numbers?
58
- int i1 = i - 90 + l * 20 + 2 ;
59
- int j1 = sr .getScaledHeight () - 16 - 3 + distance ;
58
+ final int i1 = i - 90 + l * 20 + 2 ;
59
+ final int j1 = sr .getScaledHeight () - 16 - 3 + DISTANCE ;
60
60
this .renderHotbarItem (i1 , j1 , partialTicks , entityplayer , entityplayer .inventory .mainInventory .get (l + 27 ));
61
61
}
62
62
@@ -68,7 +68,7 @@ private void drawTopHotbar(ScaledResolution sr, float partialTicks, CallbackInfo
68
68
private void moveUp () {
69
69
if (LiteLoader .getInstance ().getMod (LiteModExtendedHotbar .class ).isEnabled ()) {
70
70
glPushMatrix ();
71
- glTranslated (0 , distance , 0 );
71
+ glTranslated (0 , DISTANCE , 0 );
72
72
}
73
73
}
74
74
@@ -99,9 +99,9 @@ private void moveGui(final CallbackInfo info) {
99
99
}
100
100
101
101
@ ModifyArg (method = "renderGameOverlay" , index = 2 , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/client/gui/FontRenderer;drawString(Ljava/lang/String;III)I" ))
102
- private int moveActionBarText (int y ) {
102
+ private int moveActionBarText (final int y ) {
103
103
if (LiteLoader .getInstance ().getMod (LiteModExtendedHotbar .class ).isEnabled ()) {
104
- return y + distance ;
104
+ return y + DISTANCE ;
105
105
} else {
106
106
return y ;
107
107
}
0 commit comments