mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 13:04:46 +00:00
Added solid render option for bodywear.
This commit is contained in:
1 parent
a32db79a0b
commit
6459e7fe2a
6 files changed
+325
-27
No files matched your search
@@ -34,6 +34,10 @@ public class ModelDataShared{
|
||||
public byte armwear = 0;
|
||||
public byte legwear = 0;
|
||||
|
||||
// Solid or normal arm/legwear [0: None, 1: Both, 2: Right, 3: Left]
|
||||
public byte solidArmwear = 0;
|
||||
public byte solidLegwear = 0;
|
||||
|
||||
// Hide Body Parts [0: None, 1: Both, 2: Right, 3: Left],
|
||||
public byte hideHead = 0;
|
||||
public byte hideBody = 0;
|
||||
@@ -58,6 +62,9 @@ public class ModelDataShared{
|
||||
compound.setByte("Armwear", armwear);
|
||||
compound.setByte("Legwear", legwear);
|
||||
|
||||
compound.setByte("SolidArmwear", solidArmwear);
|
||||
compound.setByte("SolidLegwear", solidLegwear);
|
||||
|
||||
compound.setByte("hideHead", hideHead);
|
||||
compound.setByte("hideBody", hideBody);
|
||||
compound.setByte("hideArms", hideArms);
|
||||
@@ -92,6 +99,9 @@ public class ModelDataShared{
|
||||
armwear = compound.getByte("Armwear");
|
||||
legwear = compound.getByte("Legwear");
|
||||
|
||||
solidArmwear = compound.getByte("SolidArmwear");
|
||||
solidLegwear = compound.getByte("SolidLegwear");
|
||||
|
||||
hideHead = compound.getByte("hideHead");
|
||||
hideBody = compound.getByte("hideBody");
|
||||
hideArms = compound.getByte("hideArms");
|
||||
|
||||
@@ -12,6 +12,7 @@ public class GuiModelArms extends GuiModelInterface{
|
||||
|
||||
private final String[] arrArm = new String[]{"gui.no","Both","Right","Left"};
|
||||
private final String[] arrArmwear = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrSolidArmwear = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrClaws = new String[]{"gui.no","Both","Left","Right"};
|
||||
|
||||
private GuiScreen parent;
|
||||
@@ -32,6 +33,9 @@ public class GuiModelArms extends GuiModelInterface{
|
||||
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
|
||||
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrArmwear, playerdata.armwear));
|
||||
addLabel(new GuiNpcLabel(8, "Armwear", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
addButton(new GuiNpcButton(9, guiLeft + 50, y += 22, 70, 20, arrSolidArmwear, playerdata.solidArmwear));
|
||||
addLabel(new GuiNpcLabel(9, "Solid Armwear", guiLeft, y + 5, 0xFFFFFF));
|
||||
}
|
||||
|
||||
ModelPartData claws = playerdata.getPartData("claws");
|
||||
@@ -50,6 +54,9 @@ public class GuiModelArms extends GuiModelInterface{
|
||||
if(button.id == 8){
|
||||
playerdata.armwear = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 9){
|
||||
playerdata.solidArmwear = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 30){
|
||||
playerdata.hideArms = (byte) button.getValue();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
private GuiScreen parent;
|
||||
private final String[] arrLeg = new String[]{"gui.no","Both","Right","Left"};
|
||||
private final String[] arrLegwear = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrSolidLegwear = new String[]{"gui.no","Both","Left","Right"};
|
||||
private final String[] arrLegs = new String[]{"gui.no","Player","Player Naga","Spider","Horse","Naga", "Mermaid", "Mermaid 2", "Digitigrade"};
|
||||
private final String[] arrTail = new String[]{"gui.no","Player", "Player Dragon","Cat","Wolf","Horse","Dragon", "Squirrel", "Fin", "Rodent", "Feather"};
|
||||
public GuiModelLegs(GuiScreen parent, EntityCustomNpc npc){
|
||||
@@ -32,6 +33,9 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
if (npc.display.modelType == 1 || npc.display.modelType == 2) {
|
||||
addButton(new GuiNpcButton(8, guiLeft + 50, y += 22, 70, 20, arrLegwear, playerdata.legwear));
|
||||
addLabel(new GuiNpcLabel(8, "Legwear", guiLeft, y + 5, 0xFFFFFF));
|
||||
|
||||
addButton(new GuiNpcButton(9, guiLeft + 50, y += 22, 70, 20, arrSolidLegwear, playerdata.solidLegwear));
|
||||
addLabel(new GuiNpcLabel(9, "Solid", guiLeft, y + 5, 0xFFFFFF));
|
||||
}
|
||||
|
||||
addButton(new GuiNpcButton(1, guiLeft + 50, y += 22, 70, 20, arrLegs, getLegIndex(playerdata.legParts)));
|
||||
@@ -91,6 +95,9 @@ public class GuiModelLegs extends GuiModelInterface{
|
||||
if(button.id == 8){
|
||||
playerdata.legwear = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 9){
|
||||
playerdata.solidLegwear = (byte) button.getValue();
|
||||
}
|
||||
if(button.id == 30){
|
||||
playerdata.hideLegs = (byte) button.getValue();
|
||||
}
|
||||
|
||||
@@ -43,17 +43,18 @@ public class ModelMPM extends ModelNPCMale{
|
||||
|
||||
// New
|
||||
public ModelRenderer bipedBodywear;
|
||||
public ModelRenderer bipedRightArmwear;
|
||||
public ModelRenderer bipedRightArmWear;
|
||||
public ModelRenderer bipedLeftArmwear;
|
||||
public ModelRenderer bipedRightLegWear;
|
||||
public ModelRenderer bipedLeftLegWear;
|
||||
|
||||
private ModelLegs legs;
|
||||
private ModelScaleRenderer headwear;
|
||||
|
||||
private ModelScaleRenderer bodywear;
|
||||
private ModelScaleRenderer armwear;
|
||||
private ModelScaleRenderer legwear;
|
||||
private final ModelScaleRenderer solidLeftArmWear;
|
||||
private final ModelScaleRenderer solidRightArmWear;
|
||||
private final ModelScaleRenderer solidLeftLegWear;
|
||||
private final ModelScaleRenderer solidRightLegWear;
|
||||
|
||||
private ModelTail tail;
|
||||
public ModelBase entityModel;
|
||||
@@ -110,15 +111,17 @@ public class ModelMPM extends ModelNPCMale{
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, par1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.5F + par2, 0.0F);
|
||||
|
||||
this.bipedRightArmwear = (new ModelScaleRenderer(this, 40, 32));
|
||||
this.bipedRightArmwear.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightArm.addChild(this.bipedRightArmwear);
|
||||
// this.bipedRightArmWear.setRotationPoint(-5.0F, 2.5F + par2, 0.0F);
|
||||
this.bipedRightArmWear = (new ModelScaleRenderer(this, 40, 32));
|
||||
this.bipedRightArmWear.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightArm.addChild(this.bipedRightArmWear);
|
||||
this.solidRightArmWear = new ModelLimbWear(this,"arm","right");
|
||||
this.bipedRightArm.addChild(this.solidRightArmWear);
|
||||
|
||||
this.bipedLeftArmwear = new ModelScaleRenderer(this, 48, 48);
|
||||
this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F);
|
||||
this.bipedLeftArm.addChild(this.bipedLeftArmwear);
|
||||
// this.bipedLeftArmWear.setRotationPoint(5.0F, 2.5F + par2, 0.0F);
|
||||
this.solidLeftArmWear = new ModelLimbWear(this,"arm","left");
|
||||
this.bipedLeftArm.addChild(this.solidLeftArmWear);
|
||||
}
|
||||
else{
|
||||
// Steve Version
|
||||
@@ -130,15 +133,17 @@ public class ModelMPM extends ModelNPCMale{
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
||||
|
||||
this.bipedRightArmwear = (new ModelScaleRenderer(this, 40, 32));
|
||||
this.bipedRightArmwear.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightArm.addChild(this.bipedRightArmwear);
|
||||
//this.bipedRightArmWear.setRotationPoint(-5.0F, 2.0F + par2, 0.0F);
|
||||
this.bipedRightArmWear = (new ModelScaleRenderer(this, 40, 32));
|
||||
this.bipedRightArmWear.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightArm.addChild(this.bipedRightArmWear);
|
||||
this.solidRightArmWear = new ModelLimbWear(this,"arm","right");
|
||||
this.bipedRightArm.addChild(this.solidRightArmWear);
|
||||
|
||||
this.bipedLeftArmwear = new ModelScaleRenderer(this, 48, 48);
|
||||
this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedLeftArm.addChild(this.bipedLeftArmwear);
|
||||
//this.bipedLeftArmWear.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
||||
this.solidLeftArmWear = new ModelLimbWear(this,"arm","left");
|
||||
this.bipedLeftArm.addChild(this.solidLeftArmWear);
|
||||
}
|
||||
|
||||
this.bipedRightLeg = (new ModelScaleRenderer(this, 0, 16));
|
||||
@@ -152,11 +157,15 @@ public class ModelMPM extends ModelNPCMale{
|
||||
this.bipedRightLegWear = (new ModelScaleRenderer(this, 0, 32));
|
||||
this.bipedRightLegWear.addBox(-2.08F, 0.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedRightLeg.addChild(this.bipedRightLegWear);
|
||||
// this.bipedRightLegWear.setRotationPoint(-1.9F, 12.0F + par2, 0.0F);
|
||||
this.solidRightLegWear = new ModelLimbWear(this,"leg","right");
|
||||
this.bipedRightLeg.addChild(this.solidRightLegWear);
|
||||
|
||||
this.bipedLeftLegWear = new ModelScaleRenderer(this, 0, 48);
|
||||
this.bipedLeftLegWear.addBox(-1.92F, 0.0F, -2.0F, 4, 12, 4, par1 + 0.25F);
|
||||
this.bipedLeftLeg.addChild(this.bipedLeftLegWear);
|
||||
this.solidLeftLegWear = new ModelLimbWear(this,"leg","left");
|
||||
this.bipedLeftLeg.addChild(this.solidLeftLegWear);
|
||||
|
||||
|
||||
headwear = new ModelHeadwear(this);
|
||||
legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg, 64, 64);
|
||||
@@ -235,16 +244,24 @@ public class ModelMPM extends ModelNPCMale{
|
||||
this.bipedBody.addChild(this.bipedBodywear);
|
||||
|
||||
// Arms
|
||||
this.bipedRightArmwear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedRightArm.addChild(this.bipedRightArmwear);
|
||||
this.bipedRightArmWear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedRightArm.addChild(this.bipedRightArmWear);
|
||||
this.solidRightArmWear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedRightArm.addChild(this.solidRightArmWear);
|
||||
this.bipedLeftArmwear = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedLeftArm.addChild(this.bipedLeftArmwear);
|
||||
this.solidLeftArmWear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedLeftArm.addChild(this.solidLeftArmWear);
|
||||
|
||||
// Legs
|
||||
this.bipedRightLegWear = (new ModelScaleRenderer(this, 0, 0));
|
||||
this.bipedRightLeg.addChild(this.bipedRightLegWear);
|
||||
this.solidRightLegWear = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedRightLeg.addChild(this.solidRightLegWear);
|
||||
this.bipedLeftLegWear = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedLeftLeg.addChild(this.bipedLeftLegWear);
|
||||
this.solidLeftLegWear = new ModelScaleRenderer(this, 0, 0);
|
||||
this.bipedLeftLeg.addChild(this.solidLeftLegWear);
|
||||
|
||||
headwear = new ModelHeadwear(this, true);
|
||||
legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg, 64, 32);
|
||||
@@ -598,20 +615,31 @@ public class ModelMPM extends ModelNPCMale{
|
||||
|
||||
// Hide Armwear
|
||||
if(entity.modelData.armwear == 1){
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedRightArmWear).isHidden = entity.modelData.solidArmwear == 1 || entity.modelData.solidArmwear == 3;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = entity.modelData.solidArmwear == 1 || entity.modelData.solidArmwear == 2;
|
||||
|
||||
this.solidRightArmWear.isHidden = entity.modelData.solidArmwear == 0 || entity.modelData.solidArmwear == 2;
|
||||
this.solidLeftArmWear.isHidden = entity.modelData.solidArmwear == 0 || entity.modelData.solidArmwear == 3;
|
||||
}
|
||||
else if(entity.modelData.armwear == 2){
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedRightArmWear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = entity.modelData.solidArmwear == 1 || entity.modelData.solidArmwear == 2;
|
||||
|
||||
this.solidRightArmWear.isHidden = true;
|
||||
this.solidLeftArmWear.isHidden = entity.modelData.solidArmwear == 0 || entity.modelData.solidArmwear == 3;
|
||||
}
|
||||
else if(entity.modelData.armwear == 3){
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedRightArmWear).isHidden = entity.modelData.solidArmwear == 1 || entity.modelData.solidArmwear == 3;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = true;
|
||||
|
||||
this.solidRightArmWear.isHidden = entity.modelData.solidArmwear == 0 || entity.modelData.solidArmwear == 2;
|
||||
this.solidLeftArmWear.isHidden = true;
|
||||
}
|
||||
else{
|
||||
((ModelScaleRenderer)this.bipedRightArmwear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedRightArmWear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftArmwear).isHidden = true;
|
||||
this.solidRightArmWear.isHidden = true;
|
||||
this.solidLeftArmWear.isHidden = true;
|
||||
}
|
||||
|
||||
if(!bo){
|
||||
@@ -658,20 +686,31 @@ public class ModelMPM extends ModelNPCMale{
|
||||
|
||||
// Hide Legwear
|
||||
if(entity.modelData.legwear == 1){
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = entity.modelData.solidLegwear == 1 || entity.modelData.solidLegwear == 3;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = entity.modelData.solidLegwear == 1 || entity.modelData.solidLegwear == 2;
|
||||
|
||||
this.solidRightLegWear.isHidden = entity.modelData.solidLegwear == 0 || entity.modelData.solidLegwear == 2;
|
||||
this.solidLeftLegWear.isHidden = entity.modelData.solidLegwear == 0 || entity.modelData.solidLegwear == 3;
|
||||
}
|
||||
else if(entity.modelData.legwear == 2){
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = entity.modelData.solidLegwear == 1 || entity.modelData.solidLegwear == 2;
|
||||
|
||||
this.solidRightLegWear.isHidden = true;
|
||||
this.solidLeftLegWear.isHidden = entity.modelData.solidLegwear == 0 || entity.modelData.solidLegwear == 3;
|
||||
}
|
||||
else if(entity.modelData.legwear == 3){
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = false;
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = entity.modelData.solidLegwear == 1 || entity.modelData.solidLegwear == 3;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = true;
|
||||
|
||||
this.solidRightLegWear.isHidden = entity.modelData.solidLegwear == 0 || entity.modelData.solidLegwear == 2;
|
||||
this.solidLeftLegWear.isHidden = true;
|
||||
}
|
||||
else{
|
||||
((ModelScaleRenderer)this.bipedRightLegWear).isHidden = true;
|
||||
((ModelScaleRenderer)this.bipedLeftLegWear).isHidden = true;
|
||||
this.solidRightLegWear.isHidden = true;
|
||||
this.solidLeftLegWear.isHidden = true;
|
||||
}
|
||||
|
||||
this.legs.setConfig(legs,x,y,z);
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
package noppes.npcs.client.model.part;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import noppes.npcs.client.model.util.Model2DRenderer;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
|
||||
public class ModelLimbWear extends ModelScaleRenderer {
|
||||
public ModelLimbWear(ModelBase base, String limb, String side) {
|
||||
super(base);
|
||||
|
||||
float thick = 0.55f;
|
||||
switch (limb){
|
||||
case "arm":
|
||||
switch (side){
|
||||
case "right":
|
||||
rightArm(base,thick);
|
||||
break;
|
||||
case "left":
|
||||
leftArm(base,thick);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "leg":
|
||||
switch (side){
|
||||
case "right":
|
||||
rightLeg(base,thick);
|
||||
break;
|
||||
case "left":
|
||||
leftLeg(base,thick);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void rightArm(ModelBase base, float thick){
|
||||
float x = 0.95f;
|
||||
float y = -2.0f;
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 44, 36, 4, 12, 64, 64);
|
||||
front.setRotationPoint(-4.52f+x, 12.535f+y, -2.58f);
|
||||
front.setScale(0.96f,0.8175f);
|
||||
front.setThickness(thick);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 52, 36, 4, 12, 64, 64);
|
||||
back.setRotationPoint(0.6f+x, 12.535f+y, 2.58f);
|
||||
back.setScale(0.96f,0.8175f);
|
||||
back.setThickness(thick);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
Model2DRenderer right = new Model2DRenderer(base, 48, 36, 4, 12, 64, 64);
|
||||
right.setRotationPoint(0.1f+x, 12.55f+y, 2.55f);
|
||||
right.setScale(0.96f,0.82f);
|
||||
right.setThickness(thick);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 40, 36, 4, 12, 64, 64);
|
||||
left.setRotationPoint(-3.98f+x, 12.55f+y, -2.55f);
|
||||
left.setScale(0.96f,0.82f);
|
||||
left.setThickness(thick);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 44, 32, 4, 4, 64, 64);
|
||||
top.setRotationPoint(-4.525f+x, -0.6f+y, -2.55f);
|
||||
top.setScale(0.32f);
|
||||
top.setThickness(thick);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 48, 32, 4, 4, 64, 64);
|
||||
bottom.setRotationPoint(-4.5f+x, 12.0f+y, -2.525f);
|
||||
bottom.setScale(0.32f);
|
||||
bottom.setThickness(thick);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
public void leftArm(ModelBase base,float thick){
|
||||
float x = 2.95f;
|
||||
float y = -2.0f;
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 52, 52, 4, 12, 64, 64);
|
||||
front.setRotationPoint(-4.52f+x, 12.535f+y, -2.58f);
|
||||
front.setScale(0.96f,0.8175f);
|
||||
front.setThickness(thick);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 60, 52, 4, 12, 64, 64);
|
||||
back.setRotationPoint(0.6f+x, 12.535f+y, 2.58f);
|
||||
back.setScale(0.96f,0.8175f);
|
||||
back.setThickness(thick);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
Model2DRenderer right = new Model2DRenderer(base, 56, 52, 4, 12, 64, 64);
|
||||
right.setRotationPoint(0.06f+x, 12.55f+y, 2.55f);
|
||||
right.setScale(0.96f,0.82f);
|
||||
right.setThickness(thick);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 48, 52, 4, 12, 64, 64);
|
||||
left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f);
|
||||
left.setScale(0.96f,0.82f);
|
||||
left.setThickness(thick);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 52, 48, 4, 4, 64, 64);
|
||||
top.setRotationPoint(-4.525f+x, -0.6f+y, -2.55f);
|
||||
top.setScale(0.32f);
|
||||
top.setThickness(thick);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 56, 48, 4, 4, 64, 64);
|
||||
bottom.setRotationPoint(-4.56f+x, 12.0f+y, -2.55f);
|
||||
bottom.setScale(0.32f);
|
||||
bottom.setThickness(thick);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
public void rightLeg(ModelBase base, float thick){
|
||||
float x = 1.8f;
|
||||
float y = 0.0f;
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 4, 36, 4, 12, 64, 64);
|
||||
front.setRotationPoint(-4.52f+x, 12.535f+y, -2.58f);
|
||||
front.setScale(0.96f,0.8175f);
|
||||
front.setThickness(thick);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 12, 36, 4, 12, 64, 64);
|
||||
back.setRotationPoint(0.6f+x, 12.535f+y, 2.58f);
|
||||
back.setScale(0.96f,0.8175f);
|
||||
back.setThickness(thick);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
Model2DRenderer right = new Model2DRenderer(base, 8, 36, 4, 12, 64, 64);
|
||||
right.setRotationPoint(0.15f+x, 12.55f+y, 2.55f);
|
||||
right.setScale(0.96f,0.82f);
|
||||
right.setThickness(thick);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 0, 36, 4, 12, 64, 64);
|
||||
left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f);
|
||||
left.setScale(0.96f,0.82f);
|
||||
left.setThickness(thick);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 4, 32, 4, 4, 64, 64);
|
||||
top.setRotationPoint(-4.525f+x, -0.6f+y, -2.55f);
|
||||
top.setScale(0.32f);
|
||||
top.setThickness(thick);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 8, 32, 4, 4, 64, 64);
|
||||
bottom.setRotationPoint(-4.5f+x, 12.11f+y, -2.525f);
|
||||
bottom.setScale(0.32f);
|
||||
bottom.setThickness(thick);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
public void leftLeg(ModelBase base,float thick){
|
||||
float x = 2.05f;
|
||||
float y = 0.0f;
|
||||
|
||||
Model2DRenderer front = new Model2DRenderer(base, 4, 52, 4, 12, 64, 64);
|
||||
front.setRotationPoint(-4.52f+x, 12.535f+y, -2.58f);
|
||||
front.setScale(0.96f,0.8175f);
|
||||
front.setThickness(thick);
|
||||
setRotation(front, 0, 0, 0);
|
||||
this.addChild(front);
|
||||
|
||||
Model2DRenderer back = new Model2DRenderer(base, 12, 52, 4, 12, 64, 64);
|
||||
back.setRotationPoint(0.6f+x, 12.535f+y, 2.58f);
|
||||
back.setScale(0.96f,0.8175f);
|
||||
back.setThickness(thick);
|
||||
setRotation(back, 0, (float)(Math.PI), 0);
|
||||
this.addChild(back);
|
||||
|
||||
Model2DRenderer right = new Model2DRenderer(base, 8, 52, 4, 12, 64, 64);
|
||||
right.setRotationPoint(0.15f+x, 12.55f+y, 2.55f);
|
||||
right.setScale(0.96f,0.82f);
|
||||
right.setThickness(thick);
|
||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
||||
this.addChild(right);
|
||||
|
||||
Model2DRenderer left = new Model2DRenderer(base, 0, 52, 4, 12, 64, 64);
|
||||
left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f);
|
||||
left.setScale(0.96f,0.82f);
|
||||
left.setThickness(thick);
|
||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
||||
this.addChild(left);
|
||||
|
||||
|
||||
Model2DRenderer top = new Model2DRenderer(base, 4, 48, 4, 4, 64, 64);
|
||||
top.setRotationPoint(-4.525f+x, -0.6f+y, -2.55f);
|
||||
top.setScale(0.32f);
|
||||
top.setThickness(thick);
|
||||
setRotation(top, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(top);
|
||||
|
||||
Model2DRenderer bottom = new Model2DRenderer(base, 8, 48, 4, 4, 64, 64);
|
||||
bottom.setRotationPoint(-4.5f+x, 12.11f+y, -2.525f);
|
||||
bottom.setScale(0.32f);
|
||||
bottom.setThickness(thick);
|
||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||
this.addChild(bottom);
|
||||
}
|
||||
|
||||
public void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user