forum Forumsplay_arrow PMC fiber_manual_record Discussion

1

~|| Need help with Techne - New model help ||~

1 emerald6 replies582 views
created 10/28/2011 8:36 pm by Zexanima
last reply 10/28/2011 9:24 pm
I decided to add a new model. It all seemed pretty easy to figure out, until I launched the game and then this happened.

How it should be


How it really is



Model Code

// Date: 10/28/2011 4:08:43 PM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX





package net.minecraft.src;

public class ModelLurker extends ModelBase
{
public ModelLurker()
{
leg1bot = new ModelRenderer(this, 0, 16);
leg1bot.addBox(-2F, 1F, -12F, 4, 12, 4);
leg1bot.setRotationPoint(-3F, 5F, -0.06666667F);
leg1bot.rotateAngleX = 0.74357F;
leg1bot.rotateAngleY = 0F;
leg1bot.rotateAngleZ = 0F;
leg1bot.mirror = false;
leg2bot = new ModelRenderer(this, 0, 16);
leg2bot.addBox(-2F, 1F, -12F, 4, 12, 4);
leg2bot.setRotationPoint(3F, 5F, -0.1333333F);
leg2bot.rotateAngleX = 0.74357F;
leg2bot.rotateAngleY = 0F;
leg2bot.rotateAngleZ = 0F;
leg2bot.mirror = false;
foot1 = new ModelRenderer(this, 48, 0);
foot1.addBox(-2F, 17F, -3F, 4, 2, 4);
foot1.setRotationPoint(-3F, 5F, 0F);
foot1.rotateAngleX = 0F;
foot1.rotateAngleY = 0F;
foot1.rotateAngleZ = 0F;
foot1.mirror = false;
foot2 = new ModelRenderer(this, 48, 0);
foot2.addBox(-2F, 17F, -3F, 4, 2, 4);
foot2.setRotationPoint(3F, 5F, 0F);
foot2.rotateAngleX = 0F;
foot2.rotateAngleY = 0F;
foot2.rotateAngleZ = 0F;
foot2.mirror = false;
hand2 = new ModelRenderer(this, 52, 0);
hand2.addBox(0F, 13F, 6F, 2, 1, 4);
hand2.setRotationPoint(5F, -7F, 0F);
hand2.rotateAngleX = -1.63586F;
hand2.rotateAngleY = 0F;
hand2.rotateAngleZ = 0F;
hand2.mirror = false;
arm2bot = new ModelRenderer(this, 0, 16);
arm2bot.addBox(0F, -2F, 8F, 2, 12, 4);
arm2bot.setRotationPoint(5F, -7F, 0F);
arm2bot.rotateAngleX = -2.0944F;
arm2bot.rotateAngleY = 0F;
arm2bot.rotateAngleZ = 0F;
arm2bot.mirror = false;
arm1bot = new ModelRenderer(this, 0, 16);
arm1bot.addBox(-2F, -2F, 8F, 2, 12, 4);
arm1bot.setRotationPoint(-5F, -7F, -1F);
arm1bot.rotateAngleX = -2.0944F;
arm1bot.rotateAngleY = 0F;
arm1bot.rotateAngleZ = 0F;
arm1bot.mirror = false;
hand1 = new ModelRenderer(this, 52, 0);
hand1.addBox(-2F, 13F, 6F, 2, 1, 4);
hand1.setRotationPoint(-5F, -7F, -1F);
hand1.rotateAngleX = -1.63586F;
hand1.rotateAngleY = 0F;
hand1.rotateAngleZ = 0F;
hand1.mirror = false;
neck = new ModelRenderer(this, 46, 23);
neck.addBox(-1F, -1F, -6F, 2, 2, 7);
neck.setRotationPoint(0F, -7F, -4F);
neck.rotateAngleX = 0F;
neck.rotateAngleY = 0F;
neck.rotateAngleZ = 0F;
neck.mirror = false;
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -3F, -10F, 8, 11, 4);
head.setRotationPoint(0F, -7F, -4F);
head.rotateAngleX = 0F;
head.rotateAngleY = 0F;
head.rotateAngleZ = 0F;
head.mirror = false;
body = new ModelRenderer(this, 28, 8);
body.addBox(-5F, -10F, -7F, 10, 16, 8);
body.setRotationPoint(0F, -1F, 3F);
body.rotateAngleX = 0F;
body.rotateAngleY = 0F;
body.rotateAngleZ = 0F;
body.mirror = true;
leg1top = new ModelRenderer(this, 0, 16);
leg1top.addBox(-2F, 0F, -2F, 4, 12, 4);
leg1top.setRotationPoint(-3F, 5F, 0F);
leg1top.rotateAngleX = -0.48332F;
leg1top.rotateAngleY = 0F;
leg1top.rotateAngleZ = 0F;
leg1top.mirror = false;
leg2top = new ModelRenderer(this, 0, 16);
leg2top.addBox(-2F, 0F, -2F, 4, 12, 4);
leg2top.setRotationPoint(3F, 5F, 0F);
leg2top.rotateAngleX = -0.48332F;
leg2top.rotateAngleY = 0F;
leg2top.rotateAngleZ = 0F;
leg2top.mirror = false;
arm1top = new ModelRenderer(this, 0, 16);
arm1top.addBox(-2F, 0F, -2F, 2, 12, 4);
arm1top.setRotationPoint(-5F, -7F, -1F);
arm1top.rotateAngleX = -0.5236F;
arm1top.rotateAngleY = 0F;
arm1top.rotateAngleZ = 0F;
arm1top.mirror = false;
arm2top = new ModelRenderer(this, 0, 16);
arm2top.addBox(0F, 0F, -2F, 2, 12, 4);
arm2top.setRotationPoint(5F, -7F, 0F);
arm2top.rotateAngleX = -0.5236F;
arm2top.rotateAngleY = 0F;
arm2top.rotateAngleZ = 0F;
arm2top.mirror = false;
}

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
leg1bot.render(f5);
leg2bot.render(f5);
foot1.render(f5);
foot2.render(f5);
hand2.render(f5);
arm2bot.render(f5);
arm1bot.render(f5);
hand1.render(f5);
neck.render(f5);
head.render(f5);
body.render(f5);
leg1top.render(f5);
leg2top.render(f5);
arm1top.render(f5);
arm2top.render(f5);
}

public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5);
head.rotateAngleX = -(f4 / 57.29578F);
head.rotateAngleY = f3 / 57.29578F;
neck.rotateAngleX = head.rotateAngleX;
neck.rotateAngleY = head.rotateAngleY;
body.rotateAngleX = 1.570796F;
leg1top.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
leg2top.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.141593F) * 1.4F * f1;
leg1bot.rotateAngleX = leg1top.rotateAngleX;
leg2bot.rotateAngleX = leg2top.rotateAngleX;
foot1.rotateAngleX = leg1top.rotateAngleX;
foot2.rotateAngleX = leg1top.rotateAngleX;
arm1top.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.141593F) * 1.4F * f1;
arm2top.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
arm1bot.rotateAngleX = arm1top.rotateAngleX;
arm2bot.rotateAngleX = arm2top.rotateAngleX;
hand1.rotateAngleX = arm1top.rotateAngleX;
hand2.rotateAngleX = arm2top.rotateAngleX;

}


//fields
ModelRenderer leg1bot;
ModelRenderer leg2bot;
ModelRenderer foot1;
ModelRenderer foot2;
ModelRenderer hand2;
ModelRenderer arm2bot;
ModelRenderer arm1bot;
ModelRenderer hand1;
ModelRenderer neck;
ModelRenderer head;
ModelRenderer body;
ModelRenderer leg1top;
ModelRenderer leg2top;
ModelRenderer arm1top;
ModelRenderer arm2top;
}


So can anyone tip me off to what's going on here? I used the model of the pig in techne and modified it to this. I've read around on some other people's posts who have the problem but I can't find a fix that fixes mine.
Posted by avatar
Zexanima
Level 50 : Grandmaster Technomancer
57

comment Login or register to post a reply.

6 replies

10/28/2011 8:47 pm
Level 46 : Master Narwhal
BENNETTMAN
Don't use the templates, or either use ModelBase or ModelBiped.
What has happened is because you used ModelPig, it has taken your model pieces, and put them in quadruped form, the coding is different, with all the rotation angles and what not.
10/28/2011 8:49 pm
Level 50 : Grandmaster Technomancer
Zexanima
Alright. Is there a way I could start a new project as ModelBase and import my old one? Or will I have to start over.
10/28/2011 9:19 pm
Level 46 : Master Narwhal
BENNETTMAN
I don't think you can, 'cause when you choose the Model type, it automatically starts building the code as you build the mob.
It's a pain in the ass, I know.
10/28/2011 9:24 pm
Level 50 : Grandmaster Technomancer
Zexanima
Ahh, damn. Here's to starting over lol. Thanks a ton!
10/28/2011 8:43 pm
Level 46 : Master Narwhal
BENNETTMAN
You used a Quadruped template, for a Biped Model?
No wonder it is messed up.
10/28/2011 8:44 pm
Level 50 : Grandmaster Technomancer
Zexanima
Ok that's what I figured, any idea how I can fix that?

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome