diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/resource/ImageLoader.java b/src/hdskins/java/com/voxelmodpack/hdskins/resource/ImageLoader.java index 6a4ff50f..90ff7030 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/resource/ImageLoader.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/resource/ImageLoader.java @@ -6,7 +6,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureUtil; import net.minecraft.util.ResourceLocation; -import javax.annotation.Nullable; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; @@ -14,6 +13,8 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.function.Supplier; +import javax.annotation.Nullable; + public class ImageLoader implements Supplier { private static Minecraft mc = Minecraft.getMinecraft(); @@ -60,7 +61,7 @@ public class ImageLoader implements Supplier { @Nullable private ResourceLocation loadSkin(BufferedImage image) { - ResourceLocation conv = new ResourceLocation(original.getResourceDomain() + "-converted", original.getResourcePath()); + ResourceLocation conv = new ResourceLocation(original.getNamespace() + "-converted", original.getPath()); boolean success = mc.getTextureManager().loadTexture(conv, new DynamicTextureImage(image)); return success ? conv : null; } diff --git a/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java b/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java index a93edad3..bf3bffda 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java @@ -34,13 +34,13 @@ public class LayerEntityOnPonyShoulder extends AbstractPonyLayer extends AbstractPonyLayer { private static final Map HUMAN_ARMOUR = Maps.newHashMap(); @@ -149,11 +148,11 @@ public class LayerPonyArmor extends AbstractPonyLaye private static ResourceLocation getPonyResource(ResourceLocation human) { return PONY_ARMOUR.computeIfAbsent(human, key -> { - String domain = human.getResourceDomain(); + String domain = human.getNamespace(); if ("minecraft".equals(domain)) { domain = "minelittlepony"; // it's a vanilla armor. I provide these. } - String path = human.getResourcePath().replace(".png", "_pony.png"); + String path = human.getPath().replace(".png", "_pony.png"); return new ResourceLocation(domain, path); }); } diff --git a/src/main/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java b/src/main/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java index f5900193..93481468 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java @@ -1,5 +1,12 @@ package com.minelittlepony.render.layer; +import static net.minecraft.client.renderer.GlStateManager.color; +import static net.minecraft.client.renderer.GlStateManager.popMatrix; +import static net.minecraft.client.renderer.GlStateManager.pushMatrix; +import static net.minecraft.client.renderer.GlStateManager.rotate; +import static net.minecraft.client.renderer.GlStateManager.scale; +import static net.minecraft.client.renderer.GlStateManager.translate; + import com.minelittlepony.ducks.IRenderPony; import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.BodyPart; @@ -23,8 +30,6 @@ import net.minecraft.nbt.NBTUtil; import net.minecraft.tileentity.TileEntitySkull; import net.minecraft.util.EnumFacing; -import static net.minecraft.client.renderer.GlStateManager.*; - public class LayerPonyCustomHead implements LayerRenderer { private RenderLivingBase renderer; @@ -92,7 +97,7 @@ public class LayerPonyCustomHead implements LayerRen if (nbt.hasKey("SkullOwner", 10)) { profile = NBTUtil.readGameProfileFromNBT(nbt.getCompoundTag("SkullOwner")); } else if (nbt.hasKey("SkullOwner", 8)) { - profile = TileEntitySkull.updateGameprofile(new GameProfile(null, nbt.getString("SkullOwner"))); + profile = TileEntitySkull.updateGameProfile(new GameProfile(null, nbt.getString("SkullOwner"))); nbt.setTag("SkullOwner", NBTUtil.writeGameProfile(new NBTTagCompound(), profile)); } }