package com.projectreddog.machinemod.render.machines;
import org.lwjgl.opengl.GL11;
import com.projectreddog.machinemod.model.ModelSub;
import com.projectreddog.machinemod.reference.Reference;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderSub extends Render {
protected ModelBase modelLawnmower;
public RenderSub(RenderManager renderManager) {
super(renderManager);
shadowSize = 1F;
this.modelLawnmower = new ModelSub();
}
@Override
public void doRender(Entity entity, double x, double y, double z, float yaw, float pitch) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(180.0F - yaw, 0.0F, 1.0F, 0.0F);
this.bindEntityTexture(entity);
GL11.glScalef(-1.0F, -1.0F, 1.0F);
this.modelLawnmower.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
// ((ModelTractor) this.modelTractor).renderGroupObject("Plow_Cube");
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity entity) {
return new ResourceLocation("machinemod", Reference.MODEL_SUB_TEXTURE_LOCATION);
}
}