diff --git a/gradle.properties b/gradle.properties index a0bbf13b..d01d1269 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,6 +21,6 @@ org.gradle.daemon=false # Dependencies modmenu_version=4.0.6 - kirin_version=1.11.0 + kirin_version=1.12.0-beta.4 hd_skins_version=6.6.0 mson_version=1.6.1 diff --git a/src/main/java/com/minelittlepony/client/GuiPonySettings.java b/src/main/java/com/minelittlepony/client/GuiPonySettings.java index c5c4b19b..a34f0b9a 100644 --- a/src/main/java/com/minelittlepony/client/GuiPonySettings.java +++ b/src/main/java/com/minelittlepony/client/GuiPonySettings.java @@ -103,7 +103,7 @@ public class GuiPonySettings extends GameGui { row += 20; content.addButton(new Label(LEFT, row)).getStyle().setText(OPTIONS_PREFIX + "options"); - for (Setting i : config.getByCategory("settings")) { + for (Setting i : config.getCategory("settings").entries()) { boolean enabled = i != config.fillycam || allowCameraChange; Button button = content .addButton(new Toggle(LEFT, row += 20, ((Setting)i).get())) @@ -118,7 +118,7 @@ public class GuiPonySettings extends GameGui { } if (hiddenOptions) { - for (Setting i : config.getByCategory("customisation")) { + for (Setting i : config.getCategory("customisation").entries()) { Button button = content .addButton(new Toggle(LEFT, row += 20, ((Setting)i).get())) .onChange((Setting)i); diff --git a/src/main/java/com/minelittlepony/client/render/MobRenderers.java b/src/main/java/com/minelittlepony/client/render/MobRenderers.java index f01f2dcc..4e96fa2d 100644 --- a/src/main/java/com/minelittlepony/client/render/MobRenderers.java +++ b/src/main/java/com/minelittlepony/client/render/MobRenderers.java @@ -78,7 +78,7 @@ public final class MobRenderers { } public Setting option() { - return MineLittlePony.getInstance().getConfig().get(name); + return MineLittlePony.getInstance().getConfig().getCategory("entities").get(name); } public boolean set(boolean value) { diff --git a/src/main/java/com/minelittlepony/client/settings/ClientPonyConfig.java b/src/main/java/com/minelittlepony/client/settings/ClientPonyConfig.java index c2b9ec5d..7c7245ae 100644 --- a/src/main/java/com/minelittlepony/client/settings/ClientPonyConfig.java +++ b/src/main/java/com/minelittlepony/client/settings/ClientPonyConfig.java @@ -15,11 +15,15 @@ public class ClientPonyConfig extends PonyConfig { /** * Visibility mode for the horse button. */ - public final Setting horseButton = value("horseButton", VisibilityMode.AUTO); + public final Setting horseButton = value("horseButton", VisibilityMode.AUTO) + .addComment("Whether to show the mine little pony settings button on the main menu") + .addComment("AUTO (default) - only show when HDSkins is not installed") + .addComment("ON - always show") + .addComment("OFF - never show"); public ClientPonyConfig(Path path) { super(path); - MobRenderers.REGISTRY.values().forEach(r -> value(r.name, true)); + MobRenderers.REGISTRY.values().forEach(r -> value("entities", r.name, true)); } @Override diff --git a/src/main/java/com/minelittlepony/settings/PonyConfig.java b/src/main/java/com/minelittlepony/settings/PonyConfig.java index a921af9a..827e9fc6 100644 --- a/src/main/java/com/minelittlepony/settings/PonyConfig.java +++ b/src/main/java/com/minelittlepony/settings/PonyConfig.java @@ -2,41 +2,59 @@ package com.minelittlepony.settings; import net.minecraft.util.math.MathHelper; +import com.minelittlepony.api.pony.meta.Race; import com.minelittlepony.api.pony.meta.Sizes; -import com.minelittlepony.common.util.settings.JsonConfig; -import com.minelittlepony.common.util.settings.Setting; +import com.minelittlepony.common.util.settings.*; import java.nio.file.Path; /** * Storage container for MineLP client settings. */ -public class PonyConfig extends JsonConfig { +public class PonyConfig extends Config { /** * Sets the pony level. Want MOAR PONEHS? Well here you go. */ - public final Setting ponyLevel = value("ponylevel", PonyLevel.PONIES); - private final Setting scaleFactor = value("globalScaleFactor", 0.9F); + public final Setting ponyLevel = value("ponylevel", PonyLevel.PONIES) + .addComment("How much pony do you want?") + .addComment("PONIES - all players are turned into ponies") + .addComment("HUMANS - all players are humans") + .addComment("BOTH - players with compatible skins will be ponies whilst the rest are humans"); + private final Setting scaleFactor = value("globalScaleFactor", 0.9F) + .addComment("How large do you want your ponies to be?") + .addComment("Default is show scale (0.9)"); - public final Setting sizes = value("settings", "sizes", true); - public final Setting snuzzles = value("settings", "snuzzles", true); - public final Setting fillycam = value("settings", "fillycam", true); - private final Setting showscale = value("settings", "showscale", true); - public final Setting fpsmagic = value("settings", "fpsmagic", true); + public final Setting sizes = value("settings", "sizes", true) + .addComment("Allows ponies of different sizes/ages"); + public final Setting snuzzles = value("settings", "snuzzles", true) + .addComment("Controls whether ponies have snouts"); + public final Setting fillycam = value("settings", "fillycam", true) + .addComment("Turn on to adjust the player's camera position to their model"); + private final Setting showscale = value("settings", "showscale", true) + .addComment("Adjusts pony scales to match the show (approximate)"); + public final Setting fpsmagic = value("settings", "fpsmagic", true) + .addComment("Uses magic effects in first person") + .addComment("Turn this off if you encounter any compatibility issues with other mods"); public final Setting tpsmagic = value("settings", "tpsmagic", true); - public final Setting ponyskulls = value("settings", "ponyskulls", true); - public final Setting frustrum = value("settings", "frustrum", true); + public final Setting ponyskulls = value("settings", "ponyskulls", true) + .addComment("Not enough ponies? Turn this on to turn player heads and skulls into ponies too!"); + public final Setting frustrum = value("settings", "frustrum", true) + .addComment("Adjust camera intersection checks to properly cull entities when they're not in view.") + .addComment("Helps to prevent entities from vanishing when they're in long stacks"); - /** - * Debug override for pony sizes. - */ - public final Setting sizeOverride = value("sizeOverride", Sizes.UNSET); + public final Setting sizeOverride = value("debug", "sizeOverride", Sizes.UNSET) + .addComment("Overrides pony sizes") + .addComment("Possible values: TALL, BULKY, LANKY, NORMAL, YEARLING, FOAL, UNSET (default)"); - public final Setting flappyElytras = value("customisation", "flappyElytras", false); - public final Setting noFun = value("customisation", "noFun", false); + + public final Setting flappyElytras = value("customisation", "flappyElytras", false) + .addComment("Pegasi will use their wings to fly even when they're wearing an elytra"); + public final Setting noFun = value("customisation", "noFun", false) + .addComment("Disables certain easter eggs and secrets (party pooper)") + .addComment("Turning this off may help with compatibility in some cases"); public PonyConfig(Path path) { - super(path); + super(HEIRARCHICAL_JSON_ADAPTER, path); } /**