package client.renderer.model;

import org.lwjgl.opengl.GL11;

import common.entity.Entity;

public class ModelDie extends ModelBase
{
    ModelRenderer cube;

    public ModelDie()
    {
        this.cube = new ModelRenderer(this, 0, 0);
        this.cube.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16);
//        this.cube.rotationPointY += (float)(24 - 16);
    }
    
    public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef(0.0F, 0.6F, 0.0F);
        if(Math.abs(entityIn.motionX) > 0.05 || Math.abs(entityIn.motionY) > 0.05 || Math.abs(entityIn.motionZ) > 0.05)
			GL11.glRotatef((float)((entityIn.ticksExisted % 20) * (360 / 20)), 0.3f, 0.4f, 0.1f);
        this.cube.render(scale);
        GL11.glPopMatrix();
    }
}
