if (isSquare) {
render = Math.abs(playerX - (int) e.posX) < (map.renderSize / 2) - 6 && Math.abs(playerZ - (int) e.posZ) < (map.renderSize / 2) - 6;
} else {
render = MinimapUtils.insideCircle(circleX, circleY, (map.renderSize / 2) - 4, (int) e.posX, (int) e.posZ);
}
Texture tex = w.getTexture();
if (render && tex != null) {
GL11.glPushMatrix();
if (isSquare && isShowBackground) { // Square Map with ancient-style texture
GL11.glTranslatef(-34.0f, 30.0f, 0.0f);
} else if (isSquare) { // Square Map with basic texture
GL11.glTranslatef(-36.0f, 32.0f, 0.0f);
} else if (isShowBackground) { // Round Map with ancient-style texture
GL11.glTranslatef(-32.0f, 32.0f, 0.0f);
} else { // Round Map with basic texture
GL11.glTranslatef(-31.0f, 31.0f, 0.0f);
}
GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
switch (MinimapConfig.getInstance().getZoom()) {
case 0:
GL11.glTranslated(-entityZ, entityX, 0F);
break;
case 1:
GL11.glTranslated(-entityZ * 0.45F, entityX * 0.45F, 0F);
break;
case 2:
GL11.glTranslated(-entityZ * 0.25F, entityX * 0.28F, 0F);
break;
}
GL11.glScaled(0.05, 0.05, 0.05);
if (MinimapConfig.getInstance().isSquare()) {
GL11.glTranslated(-34f, -30f, 0); // Handles entity face offset for the square map
} else {
GL11.glTranslated(-32f, -32f, 0); // Handles entity face offset for the round map
}
GL11.glRotatef(-90, 0, 0, 1); // Handles entity face orientation
tex.bind();
drawOnMap();
GL11.glPopMatrix();
}
}
}