Move JEI integration to other package
This commit is contained in:
@@ -142,10 +142,6 @@ public final class RefinedStorage {
|
||||
PROXY.postInit(e);
|
||||
}
|
||||
|
||||
public static boolean hasJei() {
|
||||
return Loader.isModLoaded("JEI");
|
||||
}
|
||||
|
||||
public static boolean hasTesla() {
|
||||
return Loader.isModLoaded("Tesla");
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import refinedstorage.gui.Scrollbar;
|
||||
import refinedstorage.gui.grid.sorting.GridSortingName;
|
||||
import refinedstorage.gui.grid.sorting.GridSortingQuantity;
|
||||
import refinedstorage.gui.sidebutton.*;
|
||||
import refinedstorage.jei.RefinedStorageJEIPlugin;
|
||||
import refinedstorage.integration.jei.JEIIntegration;
|
||||
import refinedstorage.network.MessageGridCraftingClear;
|
||||
import refinedstorage.network.MessageGridInsertHeld;
|
||||
import refinedstorage.network.MessageGridPatternCreate;
|
||||
@@ -394,8 +394,8 @@ public class GuiGrid extends GuiBase {
|
||||
}
|
||||
|
||||
private void updateJEI() {
|
||||
if (RefinedStorage.hasJei() && (grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED || grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED)) {
|
||||
RefinedStorageJEIPlugin.INSTANCE.getRuntime().getItemListOverlay().setFilterText(searchField.getText());
|
||||
if (JEIIntegration.isLoaded() && (grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED || grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED)) {
|
||||
JEIIntegration.INSTANCE.getRuntime().getItemListOverlay().setFilterText(searchField.getText());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package refinedstorage.gui.sidebutton;
|
||||
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import refinedstorage.RefinedStorage;
|
||||
import refinedstorage.gui.GuiBase;
|
||||
import refinedstorage.gui.grid.GuiGrid;
|
||||
import refinedstorage.integration.jei.JEIIntegration;
|
||||
import refinedstorage.tile.grid.TileGrid;
|
||||
|
||||
public class SideButtonGridSearchBoxMode extends SideButton {
|
||||
@@ -31,7 +31,7 @@ public class SideButtonGridSearchBoxMode extends SideButton {
|
||||
if (mode == TileGrid.SEARCH_BOX_MODE_NORMAL) {
|
||||
mode = TileGrid.SEARCH_BOX_MODE_NORMAL_AUTOSELECTED;
|
||||
} else if (mode == TileGrid.SEARCH_BOX_MODE_NORMAL_AUTOSELECTED) {
|
||||
if (RefinedStorage.hasJei()) {
|
||||
if (JEIIntegration.isLoaded()) {
|
||||
mode = TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED;
|
||||
} else {
|
||||
mode = TileGrid.SEARCH_BOX_MODE_NORMAL;
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
package refinedstorage.jei;
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.api.IJeiRuntime;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import refinedstorage.RefinedStorageBlocks;
|
||||
|
||||
@JEIPlugin
|
||||
public class RefinedStorageJEIPlugin implements IModPlugin {
|
||||
public static RefinedStorageJEIPlugin INSTANCE;
|
||||
public class JEIIntegration implements IModPlugin {
|
||||
public static JEIIntegration INSTANCE;
|
||||
|
||||
private IJeiRuntime runtime;
|
||||
|
||||
@@ -36,4 +37,8 @@ public class RefinedStorageJEIPlugin implements IModPlugin {
|
||||
public IJeiRuntime getRuntime() {
|
||||
return runtime;
|
||||
}
|
||||
|
||||
public static boolean isLoaded() {
|
||||
return Loader.isModLoaded("JEI");
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package refinedstorage.jei;
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.api.gui.IGuiIngredient;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
@@ -1,4 +1,4 @@
|
||||
package refinedstorage.jei;
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
@@ -1,4 +1,4 @@
|
||||
package refinedstorage.jei;
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
@@ -1,4 +1,4 @@
|
||||
package refinedstorage.jei;
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import refinedstorage.api.RefinedStorageAPI;
|
||||
@@ -1,4 +1,4 @@
|
||||
package refinedstorage.jei;
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.plugins.vanilla.VanillaRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
Reference in New Issue
Block a user