diff options
author | nea <nea@nea.moe> | 2023-07-31 00:48:15 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-07-31 00:48:15 +0200 |
commit | e6e3f4a496bfff99bce3aa4469e74f29b3daab12 (patch) | |
tree | 0d85db5212f1c630a7c5506e51f304dd8f547dae /src/main/java/moe/nea/firmament/mixins | |
parent | dbc56fb352134839800fad2a9d71dce6ab67349a (diff) | |
download | Firmament-e6e3f4a496bfff99bce3aa4469e74f29b3daab12.tar.gz Firmament-e6e3f4a496bfff99bce3aa4469e74f29b3daab12.tar.bz2 Firmament-e6e3f4a496bfff99bce3aa4469e74f29b3daab12.zip |
Add skin fixer
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/MixinPlayerListEntry.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/MixinPlayerListEntry.java b/src/main/java/moe/nea/firmament/mixins/MixinPlayerListEntry.java new file mode 100644 index 0000000..c858db1 --- /dev/null +++ b/src/main/java/moe/nea/firmament/mixins/MixinPlayerListEntry.java @@ -0,0 +1,18 @@ +package moe.nea.firmament.mixins; + +import moe.nea.firmament.features.fixes.Fixes; +import net.minecraft.client.network.PlayerListEntry; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArg; + +@Mixin(PlayerListEntry.class) +public class MixinPlayerListEntry { + @ModifyArg(method = "loadTextures", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/texture/PlayerSkinProvider;loadSkin(Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/texture/PlayerSkinProvider$SkinTextureAvailableCallback;Z)V")) + public boolean shouldBeSecure(boolean originalSecure) { + if (Fixes.TConfig.INSTANCE.getFixUnsignedPlayerSkins()) { + return false; + } + return originalSecure; + } +} |