mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Part Data Texture Fix for Upgrading from CNPC
Issue where already saved NPCs cannot locate texture if upgrading from CNPC to CNPC+
This commit is contained in:
1 parent
dff71c5a98
commit
8a9defd3a1
1 file changed
+5
-1
@@ -24,8 +24,9 @@ public class ModelPartData {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setByte("Type", type);
|
||||
compound.setInteger("Color", color);
|
||||
if(texture != null && !texture.isEmpty())
|
||||
if(texture != null && !texture.isEmpty()) {
|
||||
compound.setString("Texture", texture);
|
||||
}
|
||||
compound.setBoolean("PlayerTexture", playerTexture);
|
||||
return compound;
|
||||
}
|
||||
@@ -34,6 +35,9 @@ public class ModelPartData {
|
||||
type = compound.getByte("Type");
|
||||
color = compound.getInteger("Color");
|
||||
texture = compound.getString("Texture");
|
||||
if(texture.contains("moreplayermodels:textures")){
|
||||
texture = texture.replace("moreplayermodels:textures", "customnpcs:textures/parts");
|
||||
}
|
||||
playerTexture = compound.getBoolean("PlayerTexture");
|
||||
location = null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user