diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-03-07 22:21:06 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-03-07 22:21:06 +0800 |
| commit | 8cd1f1a9804f980c1666079c99bafb6330c77723 (patch) | |
| tree | 449f74c31bf73a4106b2cb9bc7fb5635925b2328 /src/main/java/me/shedaniel/rei/client/ClientHelper.java | |
| parent | e5909b2fa40428d2a25a4f727a49a4f4fc47ad01 (diff) | |
| download | RoughlyEnoughItems-8cd1f1a9804f980c1666079c99bafb6330c77723.tar.gz RoughlyEnoughItems-8cd1f1a9804f980c1666079c99bafb6330c77723.tar.bz2 RoughlyEnoughItems-8cd1f1a9804f980c1666079c99bafb6330c77723.zip | |
Config with comments
Diffstat (limited to 'src/main/java/me/shedaniel/rei/client/ClientHelper.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/client/ClientHelper.java | 8 |
1 files changed, 4 insertions, 4 deletions
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())); |
