Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.triphion.ancient.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
* ModelTheFrost - Undefined
* Created using Tabula 4.1.1
public class ModelTheFrost extends ModelBase {
public ModelRenderer body;
public ModelRenderer nose;
public ModelTheFrost() {
this.textureWidth = 64;
this.textureHeight = 32;
this.body = new ModelRenderer(this, 0, 0);
this.body.setRotationPoint(-8.0F, -3.1F, -8.0F);
this.body.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
this.nose = new ModelRenderer(this, 0, 0);
this.nose.setRotationPoint(-2.2F, 2.0F, -9.4F);
this.nose.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
GL11.glTranslatef(this.body.offsetX, this.body.offsetY, this.body.offsetZ);
GL11.glTranslatef(this.body.rotationPointX * f5, this.body.rotationPointY * f5, this.body.rotationPointZ * f5);
GL11.glScaled(16.0D, 27.1D, 16.0D);
GL11.glTranslatef(-this.body.offsetX, -this.body.offsetY, -this.body.offsetZ);
GL11.glTranslatef(-this.body.rotationPointX * f5, -this.body.rotationPointY * f5, -this.body.rotationPointZ * f5);
GL11.glTranslatef(this.nose.offsetX, this.nose.offsetY, this.nose.offsetZ);
GL11.glTranslatef(this.nose.rotationPointX * f5, this.nose.rotationPointY * f5, this.nose.rotationPointZ * f5);
GL11.glScaled(5.0D, 2.3D, 1.5D);
GL11.glTranslatef(-this.nose.offsetX, -this.nose.offsetY, -this.nose.offsetZ);
GL11.glTranslatef(-this.nose.rotationPointX * f5, -this.nose.rotationPointY * f5, -this.nose.rotationPointZ * f5);
* 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;
package com.triphion.ancient.client.entity;
import com.triphion.ancient.Reference;
import com.triphion.ancient.client.model.ModelTheFrost;
import com.triphion.ancient.entity.EntityTheFrost;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderTheFrost extends RenderLiving<EntityTheFrost>
private static final ResourceLocation THE_FROSS = new ResourceLocation(Reference.MODID +":textures/entity/thefross/thefross1.png");
public RenderTheFrost(RenderManager rendermanagerIn) {
super(rendermanagerIn, new ModelTheFrost(), 0.5F);
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
protected ResourceLocation getEntityTexture(EntityTheFrost entity) {
return THE_FROSS;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.