Fixed SkinUrl for 64x64 Textures

Must Enable the Square Texture Button on NPC in order to work correct. Local Textures work just fine normally.
This commit is contained in:
KAMKEEL committed 2021-04-29 14:37:33 -04:00
1 parent 51b8e34c02
commit aeb807cea7
7 files changed
+19 -8

No files matched your search

@@ -73,16 +73,20 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
y+=23;
addLabel(new GuiNpcLabel(5,"display.livingAnimation", guiLeft + 5, y + 5));
this.addButton(new GuiNpcButton(5, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no"},display.disableLivingAnimation?1:0));
this.addButton(new GuiNpcButton(5, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no"}, display.disableLivingAnimation?1:0));
y+=23;
// Square Texture Button
addLabel(new GuiNpcLabel(300,"display.squareTexture", guiLeft + 230, y + 5));
this.addButton(new GuiNpcButton(300, guiLeft + 313, y, 50, 20, new String[]{"gui.no","gui.yes"}, display.squareTexture));
y+=23;
addLabel(new GuiNpcLabel(7,"display.visible", guiLeft + 5, y + 5));
this.addButton(new GuiNpcButton(7, guiLeft + 120, y, 50, 20, new String[]{"gui.yes","gui.no","gui.partly"}, display.visible));
y+=23;
addLabel(new GuiNpcLabel(10,"display.bossbar", guiLeft + 5, y + 5));
this.addButton(new GuiNpcButton(10, guiLeft + 120, y, 110, 20, new String[]{"display.hide","display.show","display.showAttacking"}, display.showBossBar));
//addExtra(new GuiHoverText(0, "testing", guiLeft, guiTop));
}
@@ -146,6 +150,9 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
else if(button.id == 7){
display.visible = button.getValue();
}
else if(button.id == 300){
display.squareTexture = (byte)button.getValue();
}
else if(button.id == 8){
NoppesUtil.openGUI(player, new GuiNpcTextureCloaks(npc, this));
}
@@ -286,7 +286,7 @@ public class RenderNPCInterface extends RenderLiving{
public ResourceLocation getEntityTexture(Entity entity) {
EntityNPCInterface npc = (EntityNPCInterface) entity;
boolean versionModel = npc.isUpdatedVersion; // DOES NOT WORK
boolean versionModel = false; // Square Texture
if(npc.textureLocation == null){
if(npc.display.skinType == 0)
npc.textureLocation = new ResourceLocation(npc.display.texture);
@@ -310,6 +310,9 @@ public class RenderNPCInterface extends RenderLiving{
sb.append(String.format("%02x", b&0xff));
}
npc.textureLocation = new ResourceLocation("skins/" + sb.toString());
if(npc.display.squareTexture == 1){ versionModel = true; }
loadSkin(null, npc.textureLocation, npc.display.url, versionModel);
LastTextureTick = 0;
}