File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
java/gregtech/mixins/forge Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ package gregtech .mixins .forge ;
2+
3+ import gregtech .api .items .toolitem .ItemGTToolbelt ;
4+ import gregtech .common .ConfigHolder ;
5+
6+ import net .minecraft .client .Minecraft ;
7+ import net .minecraft .client .gui .GuiIngame ;
8+ import net .minecraft .client .gui .ScaledResolution ;
9+ import net .minecraftforge .client .GuiIngameForge ;
10+
11+ import org .spongepowered .asm .mixin .Mixin ;
12+ import org .spongepowered .asm .mixin .injection .At ;
13+ import org .spongepowered .asm .mixin .injection .Redirect ;
14+
15+ @ Mixin (GuiIngameForge .class )
16+ public class GuiIngameForgeMixin extends GuiIngame {
17+
18+ private GuiIngameForgeMixin (Minecraft mcIn ) {
19+ super (mcIn );
20+ }
21+
22+ @ Redirect (method = "renderToolHighlight" ,
23+ at = @ At (value = "INVOKE" ,
24+ target = "Lnet/minecraft/client/gui/ScaledResolution;getScaledHeight()I" ))
25+ private int shiftToolHighlightText (ScaledResolution res ) {
26+ if (ConfigHolder .client .toolbeltConfig .enableToolbeltHotbarDisplay &&
27+ highlightingItemStack .getItem () instanceof ItemGTToolbelt )
28+ return res .getScaledHeight () - 31 + 6 ;
29+ else return res .getScaledHeight ();
30+ }
31+ }
Original file line number Diff line number Diff line change 55 "minVersion" : " 0.8" ,
66 "compatibilityLevel" : " JAVA_8" ,
77 "mixins" : [
8+ " GuiIngameForgeMixin" ,
89 " ModelLoaderRegistryMixin" ,
910 " OreIngredientMixin" ,
1011 " SpecialArmorPropertiesMixin"
You can’t perform that action at this time.
0 commit comments