onPreRender(mc);
final boolean absolute = !isRelativeToOrigin();
if (absolute && transforms == null) {
renderShape(mc);
} else {
final ReadonlyVector3 origin = getOriginReadonly();
if (origin == null) {
return;
}
GL11.glPushMatrix();
GL11.glTranslated(origin.getX(), origin.getY(), origin.getZ());
if (transforms != null) {
for (ShapeTransform t : transforms) {
if (t != null) {
t.preRender();
}
}
}
if (absolute) {
GL11.glTranslated(-origin.getX(), -origin.getY(), -origin.getZ());
}
renderShape(mc);
GL11.glPopMatrix();
}
onPostRender(mc);