mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Forge doesn't like notch names and neither do I.
This commit is contained in:
parent
4346ccda37
commit
f04d67caba
2 changed files with 4 additions and 15 deletions
|
@ -164,7 +164,7 @@ public class PonyManager implements IResourceManagerReloadListener, ISkinCacheCl
|
||||||
MineLittlePony.logger.info("Detected {} background ponies installed.", getNumberOfPonies());
|
MineLittlePony.logger.info("Detected {} background ponies installed.", getNumberOfPonies());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ResourceLocation getDefaultSkin(UUID uuid) {
|
public static ResourceLocation getDefaultSkin(UUID uuid) {
|
||||||
return isSlimSkin(uuid) ? ALEX : STEVE;
|
return isSlimSkin(uuid) ? ALEX : STEVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.minelittlepony.pony.data.PonyLevel;
|
||||||
import net.minecraft.client.resources.DefaultPlayerSkin;
|
import net.minecraft.client.resources.DefaultPlayerSkin;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
@ -16,16 +15,6 @@ import java.util.UUID;
|
||||||
@Mixin(DefaultPlayerSkin.class)
|
@Mixin(DefaultPlayerSkin.class)
|
||||||
public abstract class MixinDefaultPlayerSkin {
|
public abstract class MixinDefaultPlayerSkin {
|
||||||
|
|
||||||
@Shadow
|
|
||||||
private static boolean isSlimSkin(UUID playerUUID) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Shadow
|
|
||||||
public static ResourceLocation getDefaultSkin(UUID playerUUID) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Inject(method = "getDefaultSkinLegacy", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "getDefaultSkinLegacy", at = @At("HEAD"), cancellable = true)
|
||||||
private static void legacySkin(CallbackInfoReturnable<ResourceLocation> cir) {
|
private static void legacySkin(CallbackInfoReturnable<ResourceLocation> cir) {
|
||||||
if (MineLittlePony.getConfig().getPonyLevel() == PonyLevel.PONIES) {
|
if (MineLittlePony.getConfig().getPonyLevel() == PonyLevel.PONIES) {
|
||||||
|
@ -36,7 +25,7 @@ public abstract class MixinDefaultPlayerSkin {
|
||||||
@Inject(method = "getDefaultSkin", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "getDefaultSkin", at = @At("HEAD"), cancellable = true)
|
||||||
private static void defaultSkin(UUID uuid, CallbackInfoReturnable<ResourceLocation> cir) {
|
private static void defaultSkin(UUID uuid, CallbackInfoReturnable<ResourceLocation> cir) {
|
||||||
if (MineLittlePony.getConfig().getPonyLevel() == PonyLevel.PONIES) {
|
if (MineLittlePony.getConfig().getPonyLevel() == PonyLevel.PONIES) {
|
||||||
cir.setReturnValue(isSlimSkin(uuid) ? PonyManager.ALEX : PonyManager.STEVE);
|
cir.setReturnValue(PonyManager.getDefaultSkin(uuid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +34,10 @@ public abstract class MixinDefaultPlayerSkin {
|
||||||
if (MineLittlePony.getConfig().getPonyLevel() == PonyLevel.PONIES) {
|
if (MineLittlePony.getConfig().getPonyLevel() == PonyLevel.PONIES) {
|
||||||
|
|
||||||
cir.setReturnValue(MineLittlePony.getInstance().getManager()
|
cir.setReturnValue(MineLittlePony.getInstance().getManager()
|
||||||
.getPony(getDefaultSkin(uuid), uuid)
|
.getPony(PonyManager.getDefaultSkin(uuid), uuid)
|
||||||
.getRace(false)
|
.getRace(false)
|
||||||
.getModel()
|
.getModel()
|
||||||
.getId(isSlimSkin(uuid)));
|
.getId(PonyManager.isSlimSkin(uuid)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue