// Date: 28-10-2014 15:33:51
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package pneumaticCraft.common.thirdparty.cofh;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import pneumaticCraft.client.model.IBaseModel;
import pneumaticCraft.lib.Textures;
public class ModelPneumaticDynamo extends ModelBase implements IBaseModel{
//fields
ModelRenderer base;
ModelRenderer top;
public ModelPneumaticDynamo(){
textureWidth = 64;
textureHeight = 64;
base = new ModelRenderer(this, 0, 0);
base.addBox(0F, 0F, 0F, 16, 10, 16);
base.setRotationPoint(-8F, 14F, -8F);
base.setTextureSize(64, 64);
base.mirror = true;
setRotation(base, 0F, 0F, 0F);
top = new ModelRenderer(this, 0, 27);
top.addBox(0F, 0F, 0F, 8, 8, 8);
top.setRotationPoint(-4F, 8F, -4F);
top.setTextureSize(64, 64);
top.mirror = true;
setRotation(top, 0F, 0F, 0F);
}
@Override
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);
base.render(f5);
top.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z){
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void renderStatic(float size, TileEntity te){
if(te != null) {
GL11.glTranslated(0.5, 0.5, 0);
GL11.glRotated(90, 1, 0, 0);
GL11.glTranslated(-0.5, -1, -0.5);
}
base.render(size);
top.render(size);
}
@Override
public void renderDynamic(float size, TileEntity te, float partialTicks){}
@Override
public ResourceLocation getModelTexture(TileEntity tile){
return tile != null && ((TileEntityPneumaticDynamo)tile).isEnabled ? Textures.MODEL_PNEUMATIC_DYNAMO_ON : Textures.MODEL_PNEUMATIC_DYNAMO_OFF;
}
@Override
public boolean rotateModelBasedOnBlockMeta(){
return true;
}
}