Update Kirin

This commit is contained in:
Sollace 2019-08-05 11:32:27 +02:00
parent 5066c7ad64
commit 679869d3c6
4 changed files with 14 additions and 6 deletions

View file

@ -18,5 +18,5 @@ org.gradle.daemon=false
# Dependencies
fabric_version=0.3.0+
# TODO update kirin before release
kirin_version=1.14.4-1.4.3-SNAPSHOT
kirin_version=1.14.4-1.4.4-SNAPSHOT
hd_skins_version=1.14.4-5.4.2

View file

@ -12,7 +12,6 @@ import com.minelittlepony.common.event.ClientReadyCallback;
import com.minelittlepony.common.event.ScreenInitCallback;
import com.minelittlepony.common.event.SkinFilterCallback;
import com.minelittlepony.common.util.GamePaths;
import com.minelittlepony.common.util.settings.JsonConfig;
import com.minelittlepony.pony.IPonyManager;
import com.minelittlepony.settings.PonyConfig;
@ -77,7 +76,7 @@ public class MineLittlePony implements ClientModInitializer {
hasHdSkins = FabricLoader.getInstance().isModLoaded("hdskins");
hasModMenu = FabricLoader.getInstance().isModLoaded("modmenu");
config = JsonConfig.of(GamePaths.getConfigDirectory().resolve("minelp.json"), ClientPonyConfig::new);
config = new ClientPonyConfig(GamePaths.getConfigDirectory().resolve("minelp.json"));
ponyManager = new PonyManager(config);
keyBinding = FabricKeyBinding.Builder.create(new Identifier("minelittlepony", "settings"), InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_F9, "key.categories.misc").build();
@ -94,8 +93,8 @@ public class MineLittlePony implements ClientModInitializer {
ClientReadyCallback.EVENT.register(this::onClientReady);
ScreenInitCallback.EVENT.register(this::onScreenInit);
config.ponyskulls.onChanged(PonySkullRenderer::resolve);
// TODO Config is loaded too early for listeners
PonySkullRenderer.resolve(config.ponyskulls.get());
config.load();
if (FabricLoader.getInstance().isModLoaded("hdskins")) {
IndirectHDSkins.initialize();

View file

@ -8,6 +8,8 @@ import com.minelittlepony.common.client.gui.VisibilityMode;
import com.minelittlepony.common.util.settings.Setting;
import com.minelittlepony.settings.PonyConfig;
import java.nio.file.Path;
public class ClientPonyConfig extends PonyConfig {
/**
@ -15,7 +17,8 @@ public class ClientPonyConfig extends PonyConfig {
*/
public final Setting<VisibilityMode> horseButton = value("horseButton", VisibilityMode.AUTO);
public ClientPonyConfig() {
public ClientPonyConfig(Path path) {
super(path);
MobRenderers.registry.forEach(r -> value(r.name().toLowerCase(), true));
}

View file

@ -6,6 +6,8 @@ import com.minelittlepony.common.util.settings.JsonConfig;
import com.minelittlepony.common.util.settings.Setting;
import com.minelittlepony.pony.meta.Size;
import java.nio.file.Path;
/**
* Storage container for MineLP client settings.
*/
@ -30,6 +32,10 @@ public class PonyConfig extends JsonConfig {
*/
public final Setting<Size> sizeOverride = value("sizeOverride", Size.UNSET);
public PonyConfig(Path path) {
super(path);
}
/**
* Gets the current PonyLevel. That is the level of ponies you would like to see.
*