Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Java file:
- package com.animalcraft.animal;
- import org.lwjgl.opengl.GL11;
- import net.minecraft.client.model.ModelBase;
- import net.minecraft.client.model.ModelRenderer;
- import net.minecraft.entity.Entity;
- import net.minecraft.util.MathHelper;
- /**
- * Red Panda - Roslyn
- * Created using Tabula 4.1.1
- */
- public class RedPanda extends ModelBase {
- public double[] modelScale = new double[] { 0.5D, 0.5D, 0.5D };
- public ModelRenderer ArmL;
- public ModelRenderer ArmR;
- public ModelRenderer LegLT;
- public ModelRenderer LegRT;
- public ModelRenderer Body;
- public ModelRenderer Tail1;
- public ModelRenderer Head;
- public ModelRenderer Neck;
- public ModelRenderer FrontPawL;
- public ModelRenderer FrontPawR;
- public ModelRenderer LegLB;
- public ModelRenderer BackPawL;
- public ModelRenderer LeftRB;
- public ModelRenderer BackPawR;
- public ModelRenderer Tail2;
- public ModelRenderer Tail3;
- public ModelRenderer Nose;
- public ModelRenderer EarR;
- public ModelRenderer EarL;
- public RedPanda() {
- this.textureWidth = 75;
- this.textureHeight = 75;
- this.LegLB = new ModelRenderer(this, 25, 0);
- this.LegLB.setRotationPoint(0.0F, 1.8F, 0.0F);
- this.LegLB.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
- this.setRotateAngle(LegLB, 0.2792526803190927F, 0.0F, 0.0F);
- this.BackPawL = new ModelRenderer(this, 25, 5);
- this.BackPawL.setRotationPoint(0.0F, 0.7F, 0.5F);
- this.BackPawL.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.setRotateAngle(BackPawL, -0.13962634015954636F, 0.0F, -0.006806784082777885F);
- this.Body = new ModelRenderer(this, 0, 6);
- this.Body.setRotationPoint(0.0F, 7.5F, -2.0F);
- this.Body.addBox(-2.0F, 0.0F, 0.0F, 4, 2, 5, 0.0F);
- this.FrontPawL = new ModelRenderer(this, 25, 5);
- this.FrontPawL.setRotationPoint(0.0F, 2.0F, 0.5F);
- this.FrontPawL.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.FrontPawR = new ModelRenderer(this, 25, 5);
- this.FrontPawR.setRotationPoint(0.0F, 2.0F, 0.5F);
- this.FrontPawR.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.Head = new ModelRenderer(this, 0, 13);
- this.Head.setRotationPoint(0.0F, 7.0F, 3.5F);
- this.Head.addBox(-1.5F, 0.0F, 0.0F, 3, 2, 2, 0.0F);
- this.setRotateAngle(Head, -0.17453292519943295F, 0.0F, 0.0F);
- this.LegRT = new ModelRenderer(this, 20, 0);
- this.LegRT.setRotationPoint(1.0F, 8.6F, -2.0F);
- this.LegRT.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
- this.setRotateAngle(LegRT, -0.13962634015954636F, 0.0F, 0.0F);
- this.ArmL = new ModelRenderer(this, 15, 0);
- this.ArmL.setRotationPoint(-2.0F, 9.0F, 2.0F);
- this.ArmL.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1, 0.0F);
- this.Neck = new ModelRenderer(this, 23, 9);
- this.Neck.setRotationPoint(0.0F, 7.05F, 3.0F);
- this.Neck.addBox(-1.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F);
- this.Tail1 = new ModelRenderer(this, 0, 0);
- this.Tail1.setRotationPoint(-0.5F, 7.6F, -2.0F);
- this.Tail1.addBox(0.0F, 0.0F, -2.0F, 1, 1, 2, 0.0F);
- this.setRotateAngle(Tail1, 0.22759093446006054F, 0.0F, 0.0F);
- this.LeftRB = new ModelRenderer(this, 25, 0);
- this.LeftRB.setRotationPoint(0.0F, 1.8F, 0.0F);
- this.LeftRB.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
- this.setRotateAngle(LeftRB, 0.2792526803190927F, 0.0F, -0.013264502315156905F);
- this.EarR = new ModelRenderer(this, 15, 5);
- this.EarR.setRotationPoint(1.0F, -0.5F, 0.0F);
- this.EarR.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.ArmR = new ModelRenderer(this, 15, 0);
- this.ArmR.setRotationPoint(1.0F, 9.0F, 2.0F);
- this.ArmR.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1, 0.0F);
- this.Nose = new ModelRenderer(this, 20, 5);
- this.Nose.setRotationPoint(-0.5F, 1.0F, 2.0F);
- this.Nose.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.Tail2 = new ModelRenderer(this, 0, 0);
- this.Tail2.setRotationPoint(0.0F, 0.5F, -3.9F);
- this.Tail2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 2, 0.0F);
- this.setRotateAngle(Tail2, 0.2617993877991494F, 0.0F, 0.0F);
- this.Tail3 = new ModelRenderer(this, 0, 0);
- this.Tail3.setRotationPoint(0.0F, 0.5F, -1.9F);
- this.Tail3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 2, 0.0F);
- this.setRotateAngle(Tail3, 0.2617993877991494F, 0.0F, 0.0F);
- this.EarL = new ModelRenderer(this, 15, 5);
- this.EarL.setRotationPoint(-2.0F, -0.5F, 0.0F);
- this.EarL.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.BackPawR = new ModelRenderer(this, 25, 5);
- this.BackPawR.setRotationPoint(0.0F, 0.7F, 0.5F);
- this.BackPawR.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
- this.setRotateAngle(BackPawR, -0.13962634015954636F, 0.0F, 0.0F);
- this.LegLT = new ModelRenderer(this, 20, 0);
- this.LegLT.setRotationPoint(-2.0F, 8.6F, -2.0F);
- this.LegLT.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
- this.setRotateAngle(LegLT, -0.13962634015954636F, 0.0F, 0.0F);
- this.LegLT.addChild(this.LegLB);
- this.LegLB.addChild(this.BackPawL);
- this.ArmL.addChild(this.FrontPawL);
- this.ArmR.addChild(this.FrontPawR);
- this.LegRT.addChild(this.LeftRB);
- this.Head.addChild(this.EarR);
- this.Head.addChild(this.Nose);
- this.Tail1.addChild(this.Tail2);
- this.Tail2.addChild(this.Tail3);
- this.Head.addChild(this.EarL);
- this.LeftRB.addChild(this.BackPawR);
- }
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- GL11.glPushMatrix();
- GL11.glScaled(1D / modelScale[0], 1D / modelScale[1], 1D / modelScale[2]);
- this.Body.render(f5);
- this.Head.render(f5);
- this.LegRT.render(f5);
- this.ArmL.render(f5);
- this.Neck.render(f5);
- this.Tail1.render(f5);
- this.ArmR.render(f5);
- this.LegLT.render(f5);
- GL11.glPopMatrix();
- }
- /**
- * This is a helper function from Tabula to set the rotation of model parts
- */
- private void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
- modelRenderer.rotateAngleX = x;
- modelRenderer.rotateAngleY = y;
- modelRenderer.rotateAngleZ = z;
- }
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
- {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- float f6 = (180F / (float)Math.PI);
- this.LegLT.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
- this.LegRT.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
- this.LegLB.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
- this.LeftRB.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement