(Backport) Duals skin mode is now the default mode

# Conflicts:
#	src/main/java/com/minelittlepony/client/compat/hdskins/MineLPHDSkins.java
This commit is contained in:
Sollace 2024-12-14 22:43:19 +01:00
parent 0489c4bb21
commit 8dcd270fd3
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
3 changed files with 12 additions and 11 deletions

View file

@ -57,11 +57,6 @@ public class PonyConfig extends Config {
.addComment("Helps to prevent entities from vanishing when they're in long stacks"); .addComment("Helps to prevent entities from vanishing when they're in long stacks");
public final Setting<Boolean> horsieMode = value("settings", "horsieMode", false) public final Setting<Boolean> horsieMode = value("settings", "horsieMode", false)
.addComment("Enables the alternative horsey models from the April Fools 2023 update"); .addComment("Enables the alternative horsey models from the April Fools 2023 update");
public final Setting<Boolean> mixedHumanSkins = value("settings", "dualSkinMode", false)
.addComment("(Experimental) Use priority to decide between displaying the HDSkins' texture, or vanilla mojang server skin")
.addComment("(Experimental) eg. On pony level = HUMANS")
.addComment("(Experimental) Any time both skins resolve to the same race (eg. on pony-level HUMANS, or if both are ponies)")
.addComment("(Experimental) the skin with the highest priority will be chosen.");;
public final Setting<SizePreset> sizeOverride = value("debug", "sizeOverride", SizePreset.UNSET) public final Setting<SizePreset> sizeOverride = value("debug", "sizeOverride", SizePreset.UNSET)
.addComment("Overrides pony sizes") .addComment("Overrides pony sizes")

View file

@ -61,16 +61,23 @@ public class MineLPHDSkins extends ClientSkinsProxy implements ClientModInitiali
GuiSkins.setSkinsGui(GuiSkinsMineLP::new); GuiSkins.setSkinsGui(GuiSkinsMineLP::new);
HDSkins.getInstance().getSkinPrioritySorter().addSelector((skinType, playerSkins) -> { HDSkins.getInstance().getSkinPrioritySorter().addSelector((skinType, playerSkins) -> {
if (skinType == SkinType.SKIN && PonyConfig.getInstance().mixedHumanSkins.get()) { if (skinType == SkinType.SKIN) {
Optional<Pony> hdPony = getPony(playerSkins.hd()); Optional<Pony> hdPony = getPony(playerSkins.hd());
Optional<Pony> vanillaPony = getPony(playerSkins.vanilla()); Optional<Pony> vanillaPony = getPony(playerSkins.vanilla());
if (hdPony.isPresent() && vanillaPony.isPresent() if (hdPony.isPresent() && vanillaPony.isPresent()) {
&& vanillaPony.get().metadata().priority() > hdPony.get().metadata().priority() PonyLevel level = PonyConfig.getInstance().ponyLevel.get();
&& (PonyConfig.getInstance().ponyLevel.get() == PonyLevel.HUMANS || vanillaPony.get().metadata().race().isHuman() == hdPony.get().metadata().race().isHuman())) { boolean vanillaHuman = vanillaPony.get().metadata().race().isHuman();
boolean hdHuman = hdPony.get().metadata().race().isHuman();
if (vanillaHuman != hdHuman) {
return (level == PonyLevel.HUMANS ? vanillaHuman : hdHuman) ? playerSkins.vanilla() : playerSkins.hd();
}
if (vanillaPony.get().metadata().priority() > hdPony.get().metadata().priority()) {
return playerSkins.vanilla(); return playerSkins.vanilla();
} }
} }
}
return playerSkins.combined(); return playerSkins.combined();
}); });
} }

View file

@ -23,7 +23,6 @@
"minelp.options.flappyelytras": "Flap Wings whilst Gliding", "minelp.options.flappyelytras": "Flap Wings whilst Gliding",
"minelp.options.horsiemode": "Horsey Horse Mode", "minelp.options.horsiemode": "Horsey Horse Mode",
"minelp.options.nofun": "Boring Mode", "minelp.options.nofun": "Boring Mode",
"minelp.options.dualskinmode": "(Experimental) Dual Skin Mode",
"minelp.options.button": "Display On Title Screen", "minelp.options.button": "Display On Title Screen",
"minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)", "minelp.options.button.on": "Always Display\n\nBoth the pony button and HD Skins button are visible (if installed)",
"minelp.options.button.auto": "Display only when HD Skins is not installed", "minelp.options.button.auto": "Display only when HD Skins is not installed",