Skip to content

Instantly share code, notes, and snippets.


triphion/ModelClottIce Secret

Created Oct 22, 2017
What would you like to do?
package com.triphion.ancient.client.model;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelClottIce extends ModelBase
public ModelRenderer body;
* Rotation point xz is the halved number of glscaled xz
* @param textureWidthIn
* @param textureHeightIn
public ModelClottIce() {
this.textureWidth = 64;
this.textureHeight = 32;
this.body = new ModelRenderer(this, 0, 0);
this.body.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
this.body.setRotationPoint(-4F, 16F, -4F);
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(8.0D, 8.0D, 8.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);
* Helps with the rotations
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.ModelClottIce;
import com.triphion.ancient.entity.EntityClottIce;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderClottIce extends RenderLiving<EntityClottIce>{
private static final ResourceLocation CLOTT_ICE = new ResourceLocation(Reference.MODID +":textures/entity/clottice/testis.png");
public RenderClottIce(RenderManager rendermanagerIn) {
super(rendermanagerIn, new ModelClottIce(), 0.5F);
protected ResourceLocation getEntityTexture(EntityClottIce entity) {
return CLOTT_ICE;
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.