File tree Expand file tree Collapse file tree
src/main/java/com/ref/calculatoroverlay Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,9 +206,9 @@ dependencies {
206206
207207 annotationProcessor ' org.spongepowered:mixin:0.8.5:processor'
208208
209- compileOnly fg. deobf(" curse.maven:jei-238222:7391695" )
209+ implementation fg. deobf(" curse.maven:jei-238222:7391695" )
210210
211- implementation fg. deobf(" curse.maven:emi-580555:6420945" )
211+ compileOnly fg. deobf(" curse.maven:emi-580555:6420945" )
212212
213213 implementation fg. deobf(" curse.maven:applied-energistics-2-223794:7148487" )
214214 implementation fg. deobf(" curse.maven:guideme-1173950:7127447" )
Original file line number Diff line number Diff line change 1+ package com .ref .calculatoroverlay ;
2+
3+ import mezz .jei .api .IModPlugin ;
4+ import mezz .jei .api .JeiPlugin ;
5+ import mezz .jei .api .runtime .IJeiRuntime ;
6+ import net .minecraft .resources .ResourceLocation ;
7+ import org .jetbrains .annotations .NotNull ;
8+
9+ @ JeiPlugin
10+ public class JEIPlugin implements IModPlugin {
11+
12+ public static IJeiRuntime jeiRuntime ;
13+
14+ @ Override
15+ public @ NotNull ResourceLocation getPluginUid () {
16+ return ResourceLocation .fromNamespaceAndPath (CalculatorOverlay .MOD_ID , "core" );
17+ }
18+
19+ @ Override
20+ public void onRuntimeAvailable (@ NotNull IJeiRuntime jeiRuntime ) {
21+ JEIPlugin .jeiRuntime = jeiRuntime ;
22+ }
23+ }
Original file line number Diff line number Diff line change 11package com .ref .calculatoroverlay .client ;
22
3- import appeng .integration .modules .jei .JEIPlugin ;
43import com .mojang .blaze3d .platform .InputConstants ;
54import com .ref .calculatoroverlay .CalculatorOverlay ;
5+ import com .ref .calculatoroverlay .JEIPlugin ;
66import dev .emi .emi .api .EmiApi ;
77import net .minecraft .client .Minecraft ;
88import net .minecraft .client .gui .components .EditBox ;
@@ -175,7 +175,7 @@ private static void tryToggleCalculator(ScreenEvent.KeyPressed.Pre event) {
175175 if (KeyBindings .toggleCalculator == null || Minecraft .getInstance ().level == null ) return ;
176176 // Suppress toggle when an EditBox (text field) has focus to avoid hijacking typed characters
177177 if (CalculatorOverlay .JEILoad
178- && JEIPlugin .instance () .getIngredientListOverlay ().hasKeyboardFocus ()) return ;
178+ && JEIPlugin .jeiRuntime .getIngredientListOverlay ().hasKeyboardFocus ()) return ;
179179 if (CalculatorOverlay .EMILoad && EmiApi .isSearchFocused ()) return ;
180180 if (event .getScreen ().getFocused () instanceof EditBox ) return ;
181181 InputConstants .Key key = InputConstants .getKey (event .getKeyCode (), event .getScanCode ());
You can’t perform that action at this time.
0 commit comments