diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/client')
4 files changed, 27 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/client/ClientHelper.java b/src/main/java/me/shedaniel/rei/client/ClientHelper.java index e4347b85b..87e438ab3 100644 --- a/src/main/java/me/shedaniel/rei/client/ClientHelper.java +++ b/src/main/java/me/shedaniel/rei/client/ClientHelper.java @@ -2,7 +2,6 @@ package me.shedaniel.rei.client; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.IRecipeCategory; import me.shedaniel.rei.api.IRecipeDisplay; import me.shedaniel.rei.gui.ContainerGuiOverlay; @@ -95,9 +94,9 @@ public class ClientHelper { } else { ResourceLocation location = IRegistry.ITEM.getKey(cheatedStack.getItem()); String tagMessage = cheatedStack.copy().getTag() != null && !cheatedStack.copy().getTag().isEmpty() ? cheatedStack.copy().getTag().toString() : ""; - String madeUpCommand = RoughlyEnoughItemsCore.getConfigHelper().getGiveCommandPrefix() + " " + Minecraft.getInstance().player.getScoreboardName() + " " + location.toString() + tagMessage + (cheatedStack.getCount() != 1 ? " " + cheatedStack.getCount() : ""); + String madeUpCommand = ConfigHelper.getInstance().getGiveCommandPrefix() + " " + Minecraft.getInstance().player.getScoreboardName() + " " + location.toString() + tagMessage + (cheatedStack.getCount() != 1 ? " " + cheatedStack.getCount() : ""); if (madeUpCommand.length() > 256) - madeUpCommand = RoughlyEnoughItemsCore.getConfigHelper().getGiveCommandPrefix() + " " + Minecraft.getInstance().player.getScoreboardName() + " " + location.toString() + (cheatedStack.getCount() != 1 ? " " + cheatedStack.getCount() : ""); + madeUpCommand = ConfigHelper.getInstance().getGiveCommandPrefix() + " " + Minecraft.getInstance().player.getScoreboardName() + " " + location.toString() + (cheatedStack.getCount() != 1 ? " " + cheatedStack.getCount() : ""); Minecraft.getInstance().player.sendChatMessage(madeUpCommand); return true; } diff --git a/src/main/java/me/shedaniel/rei/client/ConfigHelper.java b/src/main/java/me/shedaniel/rei/client/ConfigHelper.java index d0e5de001..9b6c15596 100644 --- a/src/main/java/me/shedaniel/rei/client/ConfigHelper.java +++ b/src/main/java/me/shedaniel/rei/client/ConfigHelper.java @@ -13,8 +13,13 @@ public class ConfigHelper { private final File configFile; private REIConfig config; + private static ConfigHelper instance = new ConfigHelper(); private boolean craftableOnly; + public static ConfigHelper getInstance() { + return instance; + } + public ConfigHelper() { this.configFile = new File(RiftLoader.instance.configDir, "rei.json"); this.craftableOnly = false; @@ -105,4 +110,20 @@ public class ConfigHelper { config.sideSearchField = sideSearchField; } + public boolean checkUpdates() { + return config.checkUpdates; + } + + public void setCheckUpdates(boolean checkUpdates) { + config.checkUpdates = checkUpdates; + } + + public boolean isMirrorItemPanel() { + return config.mirrorItemPanel; + } + + public void setMirrorItemPanel(boolean mirrorItemPanel) { + config.mirrorItemPanel = mirrorItemPanel; + } + } diff --git a/src/main/java/me/shedaniel/rei/client/GuiHelper.java b/src/main/java/me/shedaniel/rei/client/GuiHelper.java index 253a51480..1f603463b 100644 --- a/src/main/java/me/shedaniel/rei/client/GuiHelper.java +++ b/src/main/java/me/shedaniel/rei/client/GuiHelper.java @@ -4,6 +4,7 @@ import com.google.common.collect.Lists; import me.shedaniel.rei.gui.ContainerGuiOverlay; import me.shedaniel.rei.gui.widget.TextFieldWidget; import me.shedaniel.rei.listeners.IMixinGuiContainer; +import me.shedaniel.rei.update.UpdateAnnouncer; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.ItemStack; @@ -59,6 +60,7 @@ public class GuiHelper implements ClientTickable { GuiHelper.lastGuiContainer = (GuiContainer) client.currentScreen; GuiHelper.lastMixinGuiContainer = (IMixinGuiContainer) lastGuiContainer; } + UpdateAnnouncer.clientTick(client); } } diff --git a/src/main/java/me/shedaniel/rei/client/REIConfig.java b/src/main/java/me/shedaniel/rei/client/REIConfig.java index 49ccb1dec..b5b798371 100644 --- a/src/main/java/me/shedaniel/rei/client/REIConfig.java +++ b/src/main/java/me/shedaniel/rei/client/REIConfig.java @@ -12,5 +12,7 @@ public class REIConfig { public boolean enableCraftableOnlyButton = true; public boolean sideSearchField = false; public String giveCommandPrefix = "/give"; + public boolean checkUpdates = true; + public boolean mirrorItemPanel = false; } |
