mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 01:41:33 +01:00
Merge pull request #114 from Silent-Client/TEST2
(fix) 3d skins with custom skins
This commit is contained in:
commit
9b75985380
@ -92,6 +92,26 @@ public abstract class AbstractClientPlayerMixin implements AbstractClientPlayerE
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "hasSkin", at = @At("HEAD"), cancellable = true)
|
||||
public void mixinHasSkin(CallbackInfoReturnable<Boolean> cir) {
|
||||
if(Minecraft.getMinecraft().currentScreen instanceof AdminRender) {
|
||||
cir.setReturnValue(true);
|
||||
cir.cancel();
|
||||
}
|
||||
|
||||
if(Client.getInstance().getSettingsManager().getSettingByClass(CosmeticsMod.class, "Custom Skins").getValBoolean() && this.silent$getAccount() != null && this.silent$getAccount().getCustomSkin()) {
|
||||
if(!CustomSkin.skins.containsKey(silent$nameClear.toLowerCase())) {
|
||||
Client.logger.info(String.format("Custom Skin not found in cache! Putting Custom Skin to cache. (%s)", silent$nameClear));
|
||||
CustomSkin.skins.put(silent$nameClear.toLowerCase(), new CustomSkin());
|
||||
}
|
||||
CustomSkin customSkin = CustomSkin.skins.get(silent$nameClear.toLowerCase());
|
||||
if(customSkin.getLocation() != null) {
|
||||
cir.setReturnValue(true);
|
||||
cir.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "getLocationSkin()Lnet/minecraft/util/ResourceLocation;", at = @At("HEAD"), cancellable = true)
|
||||
public void mixinSkinLocation(CallbackInfoReturnable<ResourceLocation> cir) {
|
||||
if(Minecraft.getMinecraft().currentScreen instanceof AdminRender) {
|
||||
|
Loading…
Reference in New Issue
Block a user