mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 17:47:32 +00:00
Remove unused Translation Data, add Rotation to Body Parts for Puppet Conversion
This commit is contained in:
1 parent
23916e88d8
commit
377e18a445
2 files changed
+32
-10
No files matched your search
@@ -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(){
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user