diff --git a/src/main/java/noppes/npcs/ModelPartConfig.java b/src/main/java/noppes/npcs/ModelPartConfig.java index 566158e27..bacae4b74 100644 --- a/src/main/java/noppes/npcs/ModelPartConfig.java +++ b/src/main/java/noppes/npcs/ModelPartConfig.java @@ -4,19 +4,37 @@ import net.minecraft.nbt.NBTTagCompound; import noppes.npcs.util.ValueUtil; public class ModelPartConfig { + // public float scaleX = 1, scaleY = 1, scaleZ = 1; - public float transX = 0, transY = 0, transZ = 0; - + public boolean shared = false; + + public float rotationX = 0f, rotationY = 0f, rotationZ = 0f; + public boolean disabled = false; + + public boolean hide = false; + // Limbwear [0: None, 1: Normal, 2: Solid] + public byte limbwear = 0; + + public ModelPartConfig(){} + + public ModelPartConfig(byte limbDefault){ + this.limbwear = limbDefault; + } public NBTTagCompound writeToNBT(){ NBTTagCompound compound = new NBTTagCompound(); compound.setFloat("ScaleX", scaleX); compound.setFloat("ScaleY", scaleY); compound.setFloat("ScaleZ", scaleZ); - - compound.setFloat("TransX", transX); - compound.setFloat("TransY", transY); - compound.setFloat("TransZ", transZ); + compound.setBoolean("Shared", shared); + + compound.setBoolean("Disabled", disabled); + compound.setFloat("RotationX", rotationX); + compound.setFloat("RotationY", rotationY); + compound.setFloat("RotationZ", rotationZ); + +// compound.setByte("Limbwear", limbwear); +// compound.setBoolean("Hide", hide); return compound; } @@ -25,9 +43,13 @@ public class ModelPartConfig { scaleY = ValueUtil.correctFloat(compound.getFloat("ScaleY"), 0.5f, 1.5f); scaleZ = ValueUtil.correctFloat(compound.getFloat("ScaleZ"), 0.5f, 1.5f); - transX = compound.getFloat("TransX"); - transY = compound.getFloat("TransY"); - transZ = compound.getFloat("TransZ"); + disabled = compound.getBoolean("Disabled"); + rotationX = ValueUtil.correctFloat(compound.getFloat("RotationX"), -0.5f, 0.5f); + rotationY = ValueUtil.correctFloat(compound.getFloat("RotationY"), -0.5f, 0.5f); + rotationZ = ValueUtil.correctFloat(compound.getFloat("RotationZ"), -0.5f, 0.5f); + +// limbwear = compound.getByte("Limbwear"); +// hide = compound.getBoolean("Hide"); } public String toString(){ diff --git a/src/main/java/noppes/npcs/client/model/util/ModelScaleRenderer.java b/src/main/java/noppes/npcs/client/model/util/ModelScaleRenderer.java index 8c5f0857c..cadf0a3dd 100644 --- a/src/main/java/noppes/npcs/client/model/util/ModelScaleRenderer.java +++ b/src/main/java/noppes/npcs/client/model/util/ModelScaleRenderer.java @@ -50,7 +50,7 @@ public class ModelScaleRenderer extends ModelRenderer { GL11.glPushMatrix(); GL11.glTranslatef(x, y, z); if(config != null) - GL11.glTranslatef(config.transX, config.transY, config.transZ); + GL11.glTranslatef(0, 0, 0); this.postRender(par1); if(config != null) GL11.glScalef(config.scaleX, config.scaleY, config.scaleZ);