public static int forceMeta = 0;
public static boolean forceMana = false;
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {
TilePool pool = (TilePool) tileentity;
GL11.glPushMatrix();
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glTranslated(d0, d1, d2);
boolean inf = tileentity.getWorldObj() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1;
boolean dil = tileentity.getWorldObj() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2;
Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture);
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
GL11.glScalef(1F, -1F, -1F);
int color = pool.color;
float[] acolor = EntitySheep.fleeceColorTable[color];
GL11.glColor3f(acolor[0], acolor[1], acolor[2]);
model.render();
GL11.glColor3f(1F, 1F, 1F);
GL11.glScalef(1F, -1F, -1F);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
float waterLevel = (float) pool.getCurrentMana() / (float) pool.manaCap * 0.4F;
if(forceMana)
waterLevel = 0.4F;
float s = 1F / 16F;
float v = 1F / 8F;
float w = -v * 3.5F;
if(pool.getWorldObj() != null) {
Block below = pool.getWorldObj().getBlock(pool.xCoord, pool.yCoord - 1, pool.zCoord);
if(below instanceof IPoolOverlayProvider) {
IIcon overlay = ((IPoolOverlayProvider) below).getIcon(pool.getWorldObj(), pool.xCoord, pool.yCoord - 1, pool.zCoord);
if(overlay != null) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDisable(GL11.GL_ALPHA_TEST);