diff --git a/src/main/java/org/cyclops/integratedterminalscompat/modcompat/emi/EmiIntegratedTerminalsConfig.java b/src/main/java/org/cyclops/integratedterminalscompat/modcompat/emi/EmiIntegratedTerminalsConfig.java index 01e0eb4..447ec12 100644 --- a/src/main/java/org/cyclops/integratedterminalscompat/modcompat/emi/EmiIntegratedTerminalsConfig.java +++ b/src/main/java/org/cyclops/integratedterminalscompat/modcompat/emi/EmiIntegratedTerminalsConfig.java @@ -1,5 +1,6 @@ package org.cyclops.integratedterminalscompat.modcompat.emi; +import dev.emi.emi.api.EmiApi; import dev.emi.emi.api.EmiEntrypoint; import dev.emi.emi.api.EmiPlugin; import dev.emi.emi.api.EmiRegistry; @@ -87,7 +88,7 @@ public void onTerminalStorageScreenSize(TerminalStorageScreenSizeEvent event) { public void onSearchFieldUpdated(TerminalStorageTabClientSearchFieldUpdateEvent event) { // Copy the terminal search box contents into the JEI search box. if (!EmiScreenManager.isDisabled() && TerminalButtonItemStackCraftingGridSearchSync.isSearchSynced(event.getClientTab())) { - EmiScreenManager.search.setValue(event.getSearchString() + ""); + EmiApi.setSearchText(event.getSearchString() + ""); } } @@ -96,11 +97,11 @@ public void onKeyTyped(ScreenEvent.KeyReleased.Post event) { // Copy the JEI search box contents into the terminal search box. if (event.getScreen() instanceof ContainerScreenTerminalStorage) { ContainerScreenTerminalStorage gui = ((ContainerScreenTerminalStorage) event.getScreen()); - if (!EmiScreenManager.isDisabled() && EmiScreenManager.search.isFocused()) { + if (!EmiScreenManager.isDisabled() && EmiApi.isSearchFocused()) { gui.getSelectedClientTab().ifPresent(tab -> { if (TerminalButtonItemStackCraftingGridSearchSync.isSearchSynced(tab)) { WidgetTextFieldExtended fieldSearch = gui.getFieldSearch(); - fieldSearch.setValue(EmiScreenManager.search.getValue()); + fieldSearch.setValue(EmiApi.getSearchText()); tab.setInstanceFilter(gui.getMenu().getSelectedChannel(), fieldSearch.getValue() + ""); } });