Skip to content

Instantly share code, notes, and snippets.

@WillR27
Created July 5, 2014 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillR27/5fef86e88a4c464ce8f0 to your computer and use it in GitHub Desktop.
Save WillR27/5fef86e88a4c464ce8f0 to your computer and use it in GitHub Desktop.
package com.blocklings.models;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import com.blocklings.entity.EntityBlockling;
public class ModelBlockling extends ModelBase {
ModelRenderer BlocklingBody;
ModelRenderer BlocklingArmLeft;
ModelRenderer BlocklingArmRight;
public ModelBlockling() {
textureWidth = 256;
textureHeight = 128;
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 8, 8, 8);
BlocklingBody.setRotationPoint(0F, 20F, 0F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, -1F, 2, 5, 2);
BlocklingArmLeft.setRotationPoint(-3F, 18F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -1F, 2, 5, 2);
BlocklingArmRight.setRotationPoint(3F, 18F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
}
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, entity);
BlocklingBody.render(f5);
BlocklingArmLeft.render(f5);
BlocklingArmRight.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, Entity entity) {
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4) {
EntityBlockling blockling = (EntityBlockling)par1EntityLivingBase;
int level = blockling.getLevel();
float attackTimer = blockling.getAttackTimer();
if(level == 1 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 8, 8, 8);
BlocklingBody.setRotationPoint(0F, 20F, 0F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, -1F, 2, 5, 2);
BlocklingArmLeft.setRotationPoint(-3F, 18F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -1F, 2, 5, 2);
BlocklingArmRight.setRotationPoint(3F, 18F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 1 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 8, 8, 8);
BlocklingBody.setRotationPoint(0F, 20F, 0F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, -1F, 2, 5, 2);
BlocklingArmLeft.setRotationPoint(-3F, 18F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -1F, 2, 5, 2);
BlocklingArmRight.setRotationPoint(3F, 18F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 2 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 10, 10, 10);
BlocklingBody.setRotationPoint(-1F, 18F, -1F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, 0F, 2, 7, 2);
BlocklingArmLeft.setRotationPoint(-4F, 16F, -1F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, 0F, 2, 7, 2);
BlocklingArmRight.setRotationPoint(4F, 16F, -1F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 2 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 10, 10, 10);
BlocklingBody.setRotationPoint(-1F, 18F, -1F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, 0F, 2, 7, 2);
BlocklingArmLeft.setRotationPoint(-4F, 16F, -1F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, 0F, 2, 7, 2);
BlocklingArmRight.setRotationPoint(4F, 16F, -1F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 3 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 12, 12, 12);
BlocklingBody.setRotationPoint(-2F, 16f, -2F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, 0F, 3, 9, 4);
BlocklingArmLeft.setRotationPoint(-5F, 14F, -2F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, 0F, 3, 9, 4);
BlocklingArmRight.setRotationPoint(4F, 14F, -2F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 3 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 12, 12, 12);
BlocklingBody.setRotationPoint(-2F, 16f, -2F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-2F, 0F, 0F, 3, 9, 4);
BlocklingArmLeft.setRotationPoint(-5F, 14F, -2F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, 0F, 3, 9, 4);
BlocklingArmRight.setRotationPoint(4F, 14F, -2F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 4 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 14, 14, 14);
BlocklingBody.setRotationPoint(-3F, 14F, -3F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-3F, 0F, -2F, 3, 11, 4);
BlocklingArmLeft.setRotationPoint(-5F, 13F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2F, 3, 11, 4);
BlocklingArmRight.setRotationPoint(5F, 13F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 4 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 14, 14, 14);
BlocklingBody.setRotationPoint(-3F, 14F, -3F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-3F, 0F, -2F, 3, 11, 4);
BlocklingArmLeft.setRotationPoint(-5F, 13F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2F, 3, 11, 4);
BlocklingArmRight.setRotationPoint(5F, 13F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 5 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 16, 16, 16);
BlocklingBody.setRotationPoint(-4F, 12F, -4F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-3F, 0F, -2F, 3, 12, 4);
BlocklingArmLeft.setRotationPoint(-6F, 11F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2F, 3, 12, 4);
BlocklingArmRight.setRotationPoint(6F, 11F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 5 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 16, 16, 16);
BlocklingBody.setRotationPoint(-4F, 12F, -4F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-3F, 0F, -2F, 3, 12, 4);
BlocklingArmLeft.setRotationPoint(-6F, 11F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2F, 3, 12, 4);
BlocklingArmRight.setRotationPoint(6F, 11F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 6 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 18, 18, 18);
BlocklingBody.setRotationPoint(-5F, 10F, -5F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-4F, 0F, -2.5F, 4, 13, 5);
BlocklingArmLeft.setRotationPoint(-6F, 10F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2.5F, 4, 13, 5);
BlocklingArmRight.setRotationPoint(6F, 10F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 6 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 18, 18, 18);
BlocklingBody.setRotationPoint(-5F, 10F, -5F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-4F, 0F, -2.5F, 4, 13, 5);
BlocklingArmLeft.setRotationPoint(-6F, 10F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2.5F, 4, 13, 5);
BlocklingArmRight.setRotationPoint(6F, 10F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 7 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 20, 20, 20);
BlocklingBody.setRotationPoint(-6F, 8F, -6F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-5F, 0F, -2.5F, 5, 15, 5);
BlocklingArmLeft.setRotationPoint(-7F, 8F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2.5F, 5, 15, 5);
BlocklingArmRight.setRotationPoint(7F, 8F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 7 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 20, 20, 20);
BlocklingBody.setRotationPoint(-6F, 8F, -6F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-5F, 0F, -2.5F, 5, 15, 5);
BlocklingArmLeft.setRotationPoint(-7F, 8F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -2.5F, 5, 15, 5);
BlocklingArmRight.setRotationPoint(7F, 8F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 8 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 22, 22, 22);
BlocklingBody.setRotationPoint(-7F, 6F, -7F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-5F, 0F, -3F, 5, 17, 6);
BlocklingArmLeft.setRotationPoint(-7.5F, 6F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -3F, 5, 17, 6);
BlocklingArmRight.setRotationPoint(7.5F, 6F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 8 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 22, 22, 22);
BlocklingBody.setRotationPoint(-7F, 6F, -7F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-5F, 0F, -3F, 5, 17, 6);
BlocklingArmLeft.setRotationPoint(-7.5F, 6F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -3F, 5, 17, 6);
BlocklingArmRight.setRotationPoint(7.5F, 6F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level == 9 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 24, 24, 24);
BlocklingBody.setRotationPoint(-8F, 4F, -8F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-5F, 0F, -3F, 5, 18, 6);
BlocklingArmLeft.setRotationPoint(-8.5F, 5F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -3F, 5, 18, 6);
BlocklingArmRight.setRotationPoint(8.5F, 5F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level == 9 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 24, 24, 24);
BlocklingBody.setRotationPoint(-8F, 4F, -8F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-5F, 0F, -3F, 5, 18, 6);
BlocklingArmLeft.setRotationPoint(-8.5F, 5F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 100, 0);
BlocklingArmRight.addBox(0F, 0F, -3F, 5, 18, 6);
BlocklingArmRight.setRotationPoint(8.5F, 5F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
} else if(level >= 10 && !blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 26, 26, 26);
BlocklingBody.setRotationPoint(-9F, 2F, -9F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-6F, 0F, -3.5F, 6, 19, 7);
BlocklingArmLeft.setRotationPoint(-9.5F, 4.5F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0.3490659F);
BlocklingArmRight = new ModelRenderer(this, 110, 0);
BlocklingArmRight.addBox(0F, 0F, -3.5F, 6, 19, 7);
BlocklingArmRight.setRotationPoint(9.5F, 4.5F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, -0.3490659F);
} else if(level >= 10 && blockling.isSitting()) {
BlocklingBody = new ModelRenderer(this, 0, 0);
BlocklingBody.addBox(-4F, -4F, -4F, 26, 26, 26);
BlocklingBody.setRotationPoint(-9F, 2F, -9F);
BlocklingBody.setTextureSize(256, 128);
BlocklingBody.mirror = true;
setRotation(BlocklingBody, 0F, 0F, 0F);
BlocklingArmLeft = new ModelRenderer(this, 175, 0);
BlocklingArmLeft.addBox(-6F, 0F, -3.5F, 6, 19, 7);
BlocklingArmLeft.setRotationPoint(-9.5F, 4.5F, 0F);
BlocklingArmLeft.setTextureSize(256, 128);
BlocklingArmLeft.mirror = true;
setRotation(BlocklingArmLeft, 0F, 0F, 0F);
BlocklingArmRight = new ModelRenderer(this, 110, 0);
BlocklingArmRight.addBox(0F, 0F, -3.5F, 6, 19, 7);
BlocklingArmRight.setRotationPoint(9.5F, 4.5F, 0F);
BlocklingArmRight.setTextureSize(256, 128);
BlocklingArmRight.mirror = true;
setRotation(BlocklingArmRight, 0F, 0F, 0F);
}
if(attackTimer > 0 && !blockling.isSitting()) {
this.BlocklingArmLeft.rotateAngleX = -1.0F + 1.0F * this.func_78172_a((float)attackTimer - par4, 10.0F);
this.BlocklingArmRight.rotateAngleX = -1.0F + 1.0F * this.func_78172_a((float)attackTimer - par4, 10.0F);
} else if(!blockling.isSitting()) {
this.BlocklingArmLeft.rotateAngleX = (-0.2F + 1.0F * this.func_78172_a(par2, 13.0F)) * par3;
this.BlocklingArmRight.rotateAngleX = (-0.2F - 1.0F * this.func_78172_a(par2, 13.0F)) * par3;
}
}
private float func_78172_a(float par1, float par2) {
return (Math.abs(par1 % par2 - par2 * 0.5F) - par2 * 0.25F) / (par2 * 0.25F);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment