Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- /**
- * ModelZombie - Either Mojang or a mod author
- * Created using Tabula 7.0.0
- */
- public class ModelScavengerAI extends ModelBase {
- public ModelRenderer RArm;
- public ModelRenderer RLeg;
- public ModelRenderer LLeg;
- public ModelRenderer LArm;
- public ModelRenderer Body;
- public ModelRenderer Head;
- public ModelRenderer Tool;
- public ModelRenderer BackPack;
- public ModelScavengerAI() {
- this.textureWidth = 64;
- this.textureHeight = 64;
- this.RLeg = new ModelRenderer(this, 0, 16);
- this.RLeg.setRotationPoint(-2.0F, 13.0F, 0.0F);
- this.RLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F);
- this.Body = new ModelRenderer(this, 16, 16);
- this.Body.setRotationPoint(0.0F, 2.2F, 0.0F);
- this.Body.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.0F);
- this.BackPack = new ModelRenderer(this, 17, 32);
- this.BackPack.setRotationPoint(0.0F, 1.0F, 2.0F);
- this.BackPack.addBox(-3.0F, 0.0F, -3.0F, 6, 8, 3, 0.0F);
- this.setRotateAngle(BackPack, 0.0F, 3.141592653589793F, 0.0F);
- this.Head = new ModelRenderer(this, 0, 0);
- this.Head.setRotationPoint(0.0F, 2.2F, 0.0F);
- this.Head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
- this.LArm = new ModelRenderer(this, 40, 16);
- this.LArm.mirror = true;
- this.LArm.setRotationPoint(5.0F, 4.0F, 0.0F);
- this.LArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F);
- this.setRotateAngle(LArm, -1.3962634015954636F, 0.10000736613927509F, -0.10000736613927509F);
- this.Tool = new ModelRenderer(this, 30, 32);
- this.Tool.setRotationPoint(1.6F, 5.0F, -6.0F);
- this.Tool.addBox(-0.0F, -8.0F, -8.0F, 1, 16, 16, 0.0F);
- this.setRotateAngle(Tool, 0.22759093446006054F, -0.091106186954104F, 0.0F);
- this.LLeg = new ModelRenderer(this, 0, 16);
- this.LLeg.mirror = true;
- this.LLeg.setRotationPoint(2.0F, 13.0F, 0.0F);
- this.LLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F);
- this.RArm = new ModelRenderer(this, 40, 16);
- this.RArm.setRotationPoint(-5.0F, 4.0F, 0.0F);
- this.RArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F);
- this.Body.addChild(this.BackPack);
- this.LArm.addChild(this.Tool);
- }
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.RLeg.offsetX, this.RLeg.offsetY, this.RLeg.offsetZ);
- GlStateManager.translate(this.RLeg.rotationPointX * f5, this.RLeg.rotationPointY * f5, this.RLeg.rotationPointZ * f5);
- GlStateManager.scale(1.0D, 0.9D, 1.0D);
- GlStateManager.translate(-this.RLeg.offsetX, -this.RLeg.offsetY, -this.RLeg.offsetZ);
- GlStateManager.translate(-this.RLeg.rotationPointX * f5, -this.RLeg.rotationPointY * f5, -this.RLeg.rotationPointZ * f5);
- this.RLeg.render(f5);
- GlStateManager.popMatrix();
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.Body.offsetX, this.Body.offsetY, this.Body.offsetZ);
- GlStateManager.translate(this.Body.rotationPointX * f5, this.Body.rotationPointY * f5, this.Body.rotationPointZ * f5);
- GlStateManager.scale(1.0D, 0.9D, 1.0D);
- GlStateManager.translate(-this.Body.offsetX, -this.Body.offsetY, -this.Body.offsetZ);
- GlStateManager.translate(-this.Body.rotationPointX * f5, -this.Body.rotationPointY * f5, -this.Body.rotationPointZ * f5);
- this.Body.render(f5);
- GlStateManager.popMatrix();
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.Head.offsetX, this.Head.offsetY, this.Head.offsetZ);
- GlStateManager.translate(this.Head.rotationPointX * f5, this.Head.rotationPointY * f5, this.Head.rotationPointZ * f5);
- GlStateManager.scale(1.0D, 0.9D, 1.0D);
- GlStateManager.translate(-this.Head.offsetX, -this.Head.offsetY, -this.Head.offsetZ);
- GlStateManager.translate(-this.Head.rotationPointX * f5, -this.Head.rotationPointY * f5, -this.Head.rotationPointZ * f5);
- this.Head.render(f5);
- GlStateManager.popMatrix();
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.LArm.offsetX, this.LArm.offsetY, this.LArm.offsetZ);
- GlStateManager.translate(this.LArm.rotationPointX * f5, this.LArm.rotationPointY * f5, this.LArm.rotationPointZ * f5);
- GlStateManager.scale(1.0D, 0.9D, 1.0D);
- GlStateManager.translate(-this.LArm.offsetX, -this.LArm.offsetY, -this.LArm.offsetZ);
- GlStateManager.translate(-this.LArm.rotationPointX * f5, -this.LArm.rotationPointY * f5, -this.LArm.rotationPointZ * f5);
- this.LArm.render(f5);
- GlStateManager.popMatrix();
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.LLeg.offsetX, this.LLeg.offsetY, this.LLeg.offsetZ);
- GlStateManager.translate(this.LLeg.rotationPointX * f5, this.LLeg.rotationPointY * f5, this.LLeg.rotationPointZ * f5);
- GlStateManager.scale(1.0D, 0.9D, 1.0D);
- GlStateManager.translate(-this.LLeg.offsetX, -this.LLeg.offsetY, -this.LLeg.offsetZ);
- GlStateManager.translate(-this.LLeg.rotationPointX * f5, -this.LLeg.rotationPointY * f5, -this.LLeg.rotationPointZ * f5);
- this.LLeg.render(f5);
- GlStateManager.popMatrix();
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.RArm.offsetX, this.RArm.offsetY, this.RArm.offsetZ);
- GlStateManager.translate(this.RArm.rotationPointX * f5, this.RArm.rotationPointY * f5, this.RArm.rotationPointZ * f5);
- GlStateManager.scale(1.0D, 0.9D, 1.0D);
- GlStateManager.translate(-this.RArm.offsetX, -this.RArm.offsetY, -this.RArm.offsetZ);
- GlStateManager.translate(-this.RArm.rotationPointX * f5, -this.RArm.rotationPointY * f5, -this.RArm.rotationPointZ * f5);
- this.RArm.render(f5);
- GlStateManager.popMatrix();
- }
- /**
- * This is a helper function from Tabula to set the rotation of model parts
- */
- public 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);
- this.Head.rotateAngleY = f3 / (180F / (float)Math.PI);
- this.Head.rotateAngleX = f4 / (180F / (float)Math.PI);
- this.LArm.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;
- this.RArm.rotateAngleX = MathHelper.cos(f * 1.0F) * 1.0F * f1;
- this.LLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F;
- this.RLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement