diff --git a/src/main/java/noppes/npcs/DataDisplay.java b/src/main/java/noppes/npcs/DataDisplay.java index 7fe58cd65..565b4bbbe 100644 --- a/src/main/java/noppes/npcs/DataDisplay.java +++ b/src/main/java/noppes/npcs/DataDisplay.java @@ -195,7 +195,6 @@ public class DataDisplay { if(prevSkinType != skinType || !texture.equals(prevTexture)) npc.textureLocation = null; - npc.textureCloakLocation = null; npc.updateHitbox(); } diff --git a/src/main/java/noppes/npcs/client/EntityUtil.java b/src/main/java/noppes/npcs/client/EntityUtil.java index b2a283205..05954bce4 100644 --- a/src/main/java/noppes/npcs/client/EntityUtil.java +++ b/src/main/java/noppes/npcs/client/EntityUtil.java @@ -89,7 +89,6 @@ public class EntityUtil { EntityNPCInterface target = (EntityNPCInterface) entity; target.textureLocation = npc.textureLocation; - target.textureCloakLocation = npc.textureCloakLocation; target.display = npc.display; target.inventory = npc.inventory; diff --git a/src/main/java/noppes/npcs/client/gui/GuiNpcTextureCloaks.java b/src/main/java/noppes/npcs/client/gui/GuiNpcTextureCloaks.java index 35e50c53a..8c4221175 100644 --- a/src/main/java/noppes/npcs/client/gui/GuiNpcTextureCloaks.java +++ b/src/main/java/noppes/npcs/client/gui/GuiNpcTextureCloaks.java @@ -74,7 +74,6 @@ public class GuiNpcTextureCloaks extends GuiNpcSelectionInterface public void elementClicked(){ if(dataTextures.contains(slot.selected) && slot.selected != null){ npc.display.cloakTexture = assets.getAsset(slot.selected); - npc.textureCloakLocation = null; } } diff --git a/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcDisplay.java b/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcDisplay.java index c52db6541..6ffbbae45 100644 --- a/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcDisplay.java +++ b/src/main/java/noppes/npcs/client/gui/mainmenu/GuiNpcDisplay.java @@ -124,12 +124,9 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene display.texture = textfield.getText(); } else if(textfield.id == 8){ - npc.textureCloakLocation = null; display.cloakTexture = textfield.getText(); } else if(textfield.id == 9){ - //npc.textureGlowLocation = null; - //display.glowTexture = textfield.getText(); if (!textfield.getText().isEmpty()) { npc.display.skinOverlayData.overlayList.put(0,new SkinOverlay(textfield.getText())); } else { diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM.java b/src/main/java/noppes/npcs/client/model/ModelMPM.java index c2b248e48..2084f08d2 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM.java @@ -934,10 +934,15 @@ public class ModelMPM extends ModelNPCMale{ public void renderCloak(EntityCustomNpc npc, float f){ if (!npc.display.cloakTexture.isEmpty() && !isArmor) { - if(npc.textureCloakLocation == null){ - npc.textureCloakLocation = new ResourceLocation(npc.display.cloakTexture); + ImageData imageData = ClientCacheHandler.getImageData(npc.display.cloakTexture); + if (!imageData.imageLoaded()) + return; + + try { + imageData.bindTexture(); + } catch (Exception e) { return; } - bindTexture((ResourceLocation) npc.textureCloakLocation); + GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, 0.125F); double d = (npc.field_20066_r + (npc.field_20063_u - npc.field_20066_r) * (double)f) - (npc.prevPosX + (npc.posX - npc.prevPosX) * (double)f); diff --git a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java index e12b550ce..19475dfb2 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java @@ -104,7 +104,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti public List interactingEntities = new ArrayList(); public ResourceLocation textureLocation = null; - public ResourceLocation textureCloakLocation = null; public EnumAnimation currentAnimation = EnumAnimation.NONE; diff --git a/src/main/resources/assets/customnpcs/textures/cloak/CobaltRevamp.png b/src/main/resources/assets/customnpcs/textures/cloak/CobaltRevamp.png new file mode 100644 index 000000000..01de5c1f9 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/CobaltRevamp.png differ