From eb817d454e89818a39793864e9f4455b09e7a291 Mon Sep 17 00:00:00 2001 From: anhgelus Date: Sat, 31 Aug 2024 23:03:10 +0000 Subject: fix(skin): NoCustomizableSkinOverlay not working --- .../molehunt/client/mixin/NoCustomizableSkinOverlay.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/java/world/anhgelus/molehunt/client/mixin/NoCustomizableSkinOverlay.java b/src/client/java/world/anhgelus/molehunt/client/mixin/NoCustomizableSkinOverlay.java index ff01075..b524920 100644 --- a/src/client/java/world/anhgelus/molehunt/client/mixin/NoCustomizableSkinOverlay.java +++ b/src/client/java/world/anhgelus/molehunt/client/mixin/NoCustomizableSkinOverlay.java @@ -7,6 +7,7 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import world.anhgelus.molehunt.Molehunt; import world.anhgelus.molehunt.client.MolehuntClient; @Mixin(GameOptions.class) @@ -16,11 +17,9 @@ public abstract class NoCustomizableSkinOverlay { @Inject(at = @At("HEAD"), method = "togglePlayerModelPart", cancellable = true) public void togglePlayerModelPart(PlayerModelPart part, boolean enabled, CallbackInfo ci) { - if (MolehuntClient.showSkins() && MolehuntClient.gameStarted()) { - setPlayerModelPart(part, true); - ((GameOptions) (Object) this).sendClientSettings(); - - ci.cancel(); - } + if (MolehuntClient.showSkins()) return; + setPlayerModelPart(part, true); + ((GameOptions) (Object) this).sendClientSettings(); + ci.cancel(); } } -- cgit v1.2.3