Update forge, better JEI checking
This commit is contained in:
@@ -17,7 +17,7 @@ group = "refinedstorage"
|
||||
archivesBaseName = "refinedstorage"
|
||||
|
||||
minecraft {
|
||||
version = "1.9-12.16.0.1826-1.9"
|
||||
version = "1.9-12.16.0.1832-1.9"
|
||||
runDir = "run"
|
||||
useDepAts = true
|
||||
mappings = "snapshot_20160312"
|
||||
|
@@ -3,6 +3,7 @@ package refinedstorage;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.Mod.Instance;
|
||||
@@ -54,4 +55,8 @@ public final class RefinedStorage {
|
||||
public void postInit(FMLPostInitializationEvent e) {
|
||||
PROXY.postInit(e);
|
||||
}
|
||||
|
||||
public static boolean hasJei() {
|
||||
return Loader.isModLoaded("JEI");
|
||||
}
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public class GuiGrid extends GuiBase {
|
||||
addSideButton(new SideButtonGridSortingDirection(grid));
|
||||
addSideButton(new SideButtonGridSortingType(grid));
|
||||
|
||||
if (PluginRefinedStorage.isJeiLoaded()) {
|
||||
if (RefinedStorage.hasJei()) {
|
||||
addSideButton(new SideButtonGridSearchBoxMode(grid));
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ public class GuiGrid extends GuiBase {
|
||||
@Override
|
||||
protected void keyTyped(char character, int keyCode) throws IOException {
|
||||
if (!checkHotbarKeys(keyCode) && searchField.textboxKeyTyped(character, keyCode)) {
|
||||
if (PluginRefinedStorage.isJeiLoaded() && grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED) {
|
||||
if (RefinedStorage.hasJei() && grid.getSearchBoxMode() == TileGrid.SEARCH_BOX_MODE_JEI_SYNCHRONIZED) {
|
||||
PluginRefinedStorage.INSTANCE.getRuntime().getItemListOverlay().setFilterText(searchField.getText());
|
||||
}
|
||||
} else {
|
||||
|
@@ -40,8 +40,4 @@ public class PluginRefinedStorage implements IModPlugin {
|
||||
public IJeiRuntime getRuntime() {
|
||||
return runtime;
|
||||
}
|
||||
|
||||
public static boolean isJeiLoaded() {
|
||||
return INSTANCE != null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user