Package me.ashtheking.dragons.model

Source Code of me.ashtheking.dragons.model.ModelSabreCat

// Date: 3/03/2012 0:26:17
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX

package me.ashtheking.dragons.model;

import net.minecraft.src.Entity;
import net.minecraft.src.MathHelper;
import net.minecraft.src.ModelBase;
import net.minecraft.src.ModelRenderer;

public class ModelSabreCat extends ModelBase {
  // fields
  ModelRenderer ear1;
  ModelRenderer ear2;
  ModelRenderer tooth1;
  ModelRenderer tooth2;
  ModelRenderer Head;
  ModelRenderer Nose;
  ModelRenderer Mouth;
  ModelRenderer body1;
  ModelRenderer Body2;
  ModelRenderer Tail;
  ModelRenderer Leg4;
  ModelRenderer Leg3;
  ModelRenderer Leg2;
  ModelRenderer Leg1;

  public ModelSabreCat() {
    textureWidth = 128;
    textureHeight = 64;

    ear1 = new ModelRenderer(this, 74, 0);
    ear1.addBox(0F, 0F, 0F, 2, 2, 1);
    ear1.setRotationPoint(-3F, 8F, -6.533333F);
    ear1.setTextureSize(64, 32);
    ear1.mirror = true;
    setRotation(ear1, 0F, 0.1745329F, -0.0872665F);
    ear2 = new ModelRenderer(this, 74, 0);
    ear2.addBox(0F, 0F, 0F, 2, 2, 1);
    ear2.setRotationPoint(4F, 8F, -7F);
    ear2.setTextureSize(64, 32);
    ear2.mirror = true;
    setRotation(ear2, 0F, -0.1745329F, 0.0872665F);
    tooth1 = new ModelRenderer(this, 68, 0);
    tooth1.addBox(0F, 0F, 0F, 1, 3, 1);
    tooth1.setRotationPoint(2F, 14.53333F, -12F);
    tooth1.setTextureSize(64, 32);
    tooth1.mirror = true;
    setRotation(tooth1, 0.2094395F, 0F, 0F);
    tooth2 = new ModelRenderer(this, 68, 0);
    tooth2.addBox(0F, 0F, 0F, 1, 3, 1);
    tooth2.setRotationPoint(0F, 14.46667F, -12F);
    tooth2.setTextureSize(64, 32);
    tooth2.mirror = true;
    setRotation(tooth2, 0.2094395F, 0F, 0F);
    Head = new ModelRenderer(this, 0, 0);
    Head.addBox(0F, 0F, 0F, 7, 7, 7);
    Head.setRotationPoint(-2F, 9F, -9F);
    Head.setTextureSize(64, 32);
    Head.mirror = true;
    setRotation(Head, 0.063722F, 0F, 0F);
    Nose = new ModelRenderer(this, 28, 0);
    Nose.addBox(0F, 0F, 0F, 4, 3, 6);
    Nose.setRotationPoint(-0.5F, 12F, -12F);
    Nose.setTextureSize(64, 32);
    Nose.mirror = true;
    setRotation(Nose, 0F, 0F, 0F);
    Mouth = new ModelRenderer(this, 48, 0);
    Mouth.addBox(0F, 0F, 0F, 4, 1, 6);
    Mouth.setRotationPoint(0F, 15.53333F, -10.53333F);
    Mouth.setTextureSize(64, 32);
    Mouth.mirror = true;
    setRotation(Mouth, 0.1919862F, 0F, 0F);
    body1 = new ModelRenderer(this, 0, 15);
    body1.addBox(-6F, 0F, -4F, 11, 9, 10);
    body1.setRotationPoint(2F, 13F, -5F);
    body1.setTextureSize(64, 32);
    body1.mirror = true;
    setRotation(body1, 1.570796F, 0F, 0F);
    Body2 = new ModelRenderer(this, 43, 14);
    Body2.addBox(0F, 0F, 0F, 7, 12, 8);
    Body2.setRotationPoint(-2F, 16F, 3F);
    Body2.setTextureSize(64, 32);
    Body2.mirror = true;
    setRotation(Body2, 1.570796F, 0F, 0F);
   
    Tail = new ModelRenderer(this, 74, 14);
    Tail.addBox(0F, 0F, 0F, 3, 10, 2);
    Tail.setRotationPoint(0F, 11F, 13F);
    Tail.setTextureSize(64, 32);
    Tail.mirror = true;
    setRotation(Tail, 0.7211002F, 0F, 0F);
   
    Leg4 = new ModelRenderer(this, 0, 35);
    Leg4.addBox(0F, 0F, 0F, 3, 11, 3);
    Leg4.setRotationPoint(-2.466667F, 13F, 11F);
    Leg4.setTextureSize(64, 32);
    Leg4.mirror = true;
    setRotation(Leg4, 0F, 0F, 0F);
   
    Leg3 = new ModelRenderer(this, 0, 35);
    Leg3.addBox(0F, 0F, 0F, 3, 11, 3);
    Leg3.setRotationPoint(2.466667F, 13F, 11F);
    Leg3.setTextureSize(64, 32);
    Leg3.mirror = true;
    setRotation(Leg3, 0F, 0F, 0F);
   
    Leg2 = new ModelRenderer(this, 0, 35);
    Leg2.addBox(0F, 0F, 0F, 3, 9, 3);
    Leg2.setRotationPoint(2.466667F, 15F, -3F);
    Leg2.setTextureSize(64, 32);
    Leg2.mirror = true;
    setRotation(Leg2, 0F, 0F, 0F);
   
    Leg1 = new ModelRenderer(this, 0, 35);
    Leg1.addBox(0F, 0F, 0F, 3, 9, 3);
    Leg1.setRotationPoint(-2.533333F, 15F, -3F);
    Leg1.setTextureSize(64, 32);
    Leg1.mirror = true;
    setRotation(Leg1, 0F, 0F, 0F);
  }

  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);
    ear1.render(f5);
    ear2.render(f5);
    tooth1.render(f5);
    tooth2.render(f5);
    Head.render(f5);
    Nose.render(f5);
    Mouth.render(f5);
    body1.render(f5);
    Body2.render(f5);
    Tail.render(f5);
    Leg4.render(f5);
    Leg3.render(f5);
    Leg2.render(f5);
    Leg1.render(f5);
  }

  private void setRotation(ModelRenderer model, float x, float y, float z) {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
 
  }

  public void setRotationAngles(float f, float f1, float f2, float f3,
      float f4, float f5) {
   
     Leg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
          Leg2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
          Leg3.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
          Leg4.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
    super.setRotationAngles(f, f1, f2, f3, f4, f5);
  }

}
TOP

Related Classes of me.ashtheking.dragons.model.ModelSabreCat

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.