Update kirin

This commit is contained in:
Sollace 2022-11-03 00:47:27 +01:00
parent da2ccc75fc
commit 968237a218
5 changed files with 47 additions and 25 deletions

View file

@ -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

View file

@ -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<Boolean>)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<Boolean>)i).get()))
.onChange((Setting<Boolean>)i);

View file

@ -78,7 +78,7 @@ public final class MobRenderers {
}
public Setting<Boolean> option() {
return MineLittlePony.getInstance().getConfig().<Boolean>get(name);
return MineLittlePony.getInstance().getConfig().getCategory("entities").<Boolean>get(name);
}
public boolean set(boolean value) {

View file

@ -15,11 +15,15 @@ public class ClientPonyConfig extends PonyConfig {
/**
* Visibility mode for the horse button.
*/
public final Setting<VisibilityMode> horseButton = value("horseButton", VisibilityMode.AUTO);
public final Setting<VisibilityMode> 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

View file

@ -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> ponyLevel = value("ponylevel", PonyLevel.PONIES);
private final Setting<Float> scaleFactor = value("globalScaleFactor", 0.9F);
public final Setting<PonyLevel> 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<Float> 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<Boolean> sizes = value("settings", "sizes", true);
public final Setting<Boolean> snuzzles = value("settings", "snuzzles", true);
public final Setting<Boolean> fillycam = value("settings", "fillycam", true);
private final Setting<Boolean> showscale = value("settings", "showscale", true);
public final Setting<Boolean> fpsmagic = value("settings", "fpsmagic", true);
public final Setting<Boolean> sizes = value("settings", "sizes", true)
.addComment("Allows ponies of different sizes/ages");
public final Setting<Boolean> snuzzles = value("settings", "snuzzles", true)
.addComment("Controls whether ponies have snouts");
public final Setting<Boolean> fillycam = value("settings", "fillycam", true)
.addComment("Turn on to adjust the player's camera position to their model");
private final Setting<Boolean> showscale = value("settings", "showscale", true)
.addComment("Adjusts pony scales to match the show (approximate)");
public final Setting<Boolean> 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<Boolean> tpsmagic = value("settings", "tpsmagic", true);
public final Setting<Boolean> ponyskulls = value("settings", "ponyskulls", true);
public final Setting<Boolean> frustrum = value("settings", "frustrum", true);
public final Setting<Boolean> ponyskulls = value("settings", "ponyskulls", true)
.addComment("Not enough ponies? Turn this on to turn player heads and skulls into ponies too!");
public final Setting<Boolean> 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<Sizes> sizeOverride = value("sizeOverride", Sizes.UNSET);
public final Setting<Sizes> sizeOverride = value("debug", "sizeOverride", Sizes.UNSET)
.addComment("Overrides pony sizes")
.addComment("Possible values: TALL, BULKY, LANKY, NORMAL, YEARLING, FOAL, UNSET (default)");
public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false);
public final Setting<Boolean> noFun = value("customisation", "noFun", false);
public final Setting<Boolean> flappyElytras = value("customisation", "flappyElytras", false)
.addComment("Pegasi will use their wings to fly even when they're wearing an elytra");
public final Setting<Boolean> 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);
}
/**