From 8cd1f1a9804f980c1666079c99bafb6330c77723 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 7 Mar 2019 22:21:06 +0800 Subject: Config with comments --- src/main/java/me/shedaniel/rei/client/ClientHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/client/ClientHelper.java') diff --git a/src/main/java/me/shedaniel/rei/client/ClientHelper.java b/src/main/java/me/shedaniel/rei/client/ClientHelper.java index b91d43f32..ad14db62f 100644 --- a/src/main/java/me/shedaniel/rei/client/ClientHelper.java +++ b/src/main/java/me/shedaniel/rei/client/ClientHelper.java @@ -64,13 +64,13 @@ public class ClientHelper implements ClientModInitializer { } public static boolean isCheating() { - return RoughlyEnoughItemsCore.getConfigHelper().getConfig().cheating; + return RoughlyEnoughItemsCore.getConfigManager().getConfig().cheating; } public static void setCheating(boolean cheating) { - RoughlyEnoughItemsCore.getConfigHelper().getConfig().cheating = cheating; + RoughlyEnoughItemsCore.getConfigManager().getConfig().cheating = cheating; try { - RoughlyEnoughItemsCore.getConfigHelper().saveConfig(); + RoughlyEnoughItemsCore.getConfigManager().saveConfig(); } catch (IOException e) { e.printStackTrace(); } @@ -95,7 +95,7 @@ public class ClientHelper implements ClientModInitializer { } else { Identifier identifier = Registry.ITEM.getId(cheatedStack.getItem()); String tagMessage = cheatedStack.copy().getTag() != null && !cheatedStack.copy().getTag().isEmpty() ? cheatedStack.copy().getTag().asString() : ""; - String og = cheatedStack.getAmount() != 1 ? RoughlyEnoughItemsCore.getConfigHelper().getConfig().giveCommand.replaceAll(" \\{count}", "").replaceAll("\\{count}", "") : RoughlyEnoughItemsCore.getConfigHelper().getConfig().giveCommand; + String og = cheatedStack.getAmount() != 1 ? RoughlyEnoughItemsCore.getConfigManager().getConfig().giveCommand.replaceAll(" \\{count}", "").replaceAll("\\{count}", "") : RoughlyEnoughItemsCore.getConfigManager().getConfig().giveCommand; String madeUpCommand = og.replaceAll("\\{player_name}", MinecraftClient.getInstance().player.getEntityName()).replaceAll("\\{item_identifier}", identifier.toString()).replaceAll("\\{nbt}", tagMessage).replaceAll("\\{count}", String.valueOf(cheatedStack.getAmount())); if (madeUpCommand.length() > 256) { madeUpCommand = og.replaceAll("\\{player_name}", MinecraftClient.getInstance().player.getEntityName()).replaceAll("\\{item_identifier}", identifier.toString()).replaceAll("\\{nbt}", "").replaceAll("\\{count}", String.valueOf(cheatedStack.getAmount())); -- cgit