File tree Expand file tree Collapse file tree
java/com/github/gtexpert/core/mixins/gregtech Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 2.7.1
2+ - Fix server boot crash [ #354 ] ( https://github.com/GTModpackTeam/GTExpert-Core/pull/354 )
3+
4+ * * *
5+
16# 2.7.0
27- Chisel integration move to [ GTModpackTeam/GTMoreTools] ( https://github.com/GTModpackTeam/GTMoreTools )
38
Original file line number Diff line number Diff line change 1+ package com .github .gtexpert .core .mixins .gregtech ;
2+
3+ import java .util .List ;
4+
5+ import net .minecraft .client .resources .I18n ;
6+
7+ import org .spongepowered .asm .mixin .Mixin ;
8+ import org .spongepowered .asm .mixin .injection .At ;
9+ import org .spongepowered .asm .mixin .injection .Redirect ;
10+
11+ import gregtech .common .items .armor .QuarkTechSuite ;
12+
13+ import com .github .gtexpert .core .common .GTEConfigHolder ;
14+
15+ /**
16+ * Client-only mixin to hide the auto-eat tooltip when the feature is disabled via config.
17+ */
18+ @ Mixin (value = QuarkTechSuite .class , remap = false )
19+ public class QuarkTechSuiteClientMixin {
20+
21+ /**
22+ * Hides the auto-eat tooltip when the feature is disabled via config.
23+ */
24+ @ Redirect (method = "addInfo" ,
25+ at = @ At (value = "INVOKE" , target = "Ljava/util/List;add(Ljava/lang/Object;)Z" ))
26+ private boolean gtexpert$hideAutoEatTooltip (List <String > list , Object element ) {
27+ if (GTEConfigHolder .ceuOverride .disableHelmetAutoEat &&
28+ element .equals (I18n .format ("metaarmor.tooltip.autoeat" ))) {
29+ return false ;
30+ }
31+ return list .add ((String ) element );
32+ }
33+ }
Original file line number Diff line number Diff line change 11package com .github .gtexpert .core .mixins .gregtech ;
22
3- import java .util .List ;
4-
5- import net .minecraft .client .resources .I18n ;
63import net .minecraft .util .FoodStats ;
74
85import org .spongepowered .asm .mixin .Mixin ;
@@ -35,17 +32,4 @@ public class QuarkTechSuiteMixin {
3532 return foodStats .needFood ();
3633 }
3734 }
38-
39- /**
40- * Hides the auto-eat tooltip when the feature is disabled via config.
41- */
42- @ Redirect (method = "addInfo" ,
43- at = @ At (value = "INVOKE" , target = "Ljava/util/List;add(Ljava/lang/Object;)Z" ))
44- private boolean gtexpert$hideAutoEatTooltip (List <String > list , Object element ) {
45- if (GTEConfigHolder .ceuOverride .disableHelmetAutoEat &&
46- element .equals (I18n .format ("metaarmor.tooltip.autoeat" ))) {
47- return false ;
48- }
49- return list .add ((String ) element );
50- }
5135}
Original file line number Diff line number Diff line change 1010 "server" : [
1111 ],
1212 "client" : [
13+ " QuarkTechSuiteClientMixin"
1314 ]
1415}
You can’t perform that action at this time.
0 commit comments