Skip to content

Instantly share code, notes, and snippets.

@TheXFactor117
Created July 24, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheXFactor117/88eea3b6378bcd3b0a1f to your computer and use it in GitHub Desktop.
Save TheXFactor117/88eea3b6378bcd3b0a1f to your computer and use it in GitHub Desktop.
Re-sizing Entities
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);
float scaleFactor = 0.4F; // determines the scale of the entity. Mess with this to find the right size.
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 1.5F - 1.5F * scaleFactor, 0.0F);
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
// render code
GL11.glPopMatrix(); // Don't forget to pop the matrix afterwards.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment