Some cleanup for the tank's render

Still haven't fixed that odd error with the connector rendering on the
wrong face. Though the plan is to remove the connector render as you
can't see it past the pipe.
This commit is contained in:
Rseifert 2013-03-29 14:54:10 -04:00
parent f24732fed4
commit 90539dd231
2 changed files with 183 additions and 183 deletions

View file

@ -357,13 +357,13 @@ public class ModelLiquidTank extends ModelBase
public void renderMeter(TileEntity tee, float f5) public void renderMeter(TileEntity tee, float f5)
{ {
TileEntity[] ents = new TileEntity[6]; TileEntity[] conenctedTiles = new TileEntity[6];
if (tee instanceof TileEntityTank) if (tee instanceof TileEntityTank)
{ {
ents = ((TileEntityTank) tee).cc; conenctedTiles = ((TileEntityTank) tee).connectedBlocks;
} }
// Front // Front
if (ents[2] instanceof TileEntityPipe) if (conenctedTiles[2] instanceof TileEntityPipe)
{ {
CCFront.render(f5); CCFront.render(f5);
} }
@ -377,7 +377,7 @@ public class ModelLiquidTank extends ModelBase
GuageL.render(f5); GuageL.render(f5);
} }
// back // back
if (ents[3] instanceof TileEntityPipe) if (conenctedTiles[3] instanceof TileEntityPipe)
{ {
CCBack.render(f5); CCBack.render(f5);
} }
@ -391,7 +391,7 @@ public class ModelLiquidTank extends ModelBase
GuageL3.render(f5); GuageL3.render(f5);
} }
// right // right
if (ents[4] instanceof TileEntityPipe) if (conenctedTiles[4] instanceof TileEntityPipe)
{ {
CCRight.render(f5); CCRight.render(f5);
} }
@ -405,7 +405,7 @@ public class ModelLiquidTank extends ModelBase
GuageL4.render(f5); GuageL4.render(f5);
} }
// left // left
if (ents[5] instanceof TileEntityPipe) if (conenctedTiles[5] instanceof TileEntityPipe)
{ {
CCLeft.render(f5); CCLeft.render(f5);
} }

View file

@ -79,18 +79,18 @@ public class RenderTank extends TileEntitySpecialRenderer
public static String getTankTexture(int meta) public static String getTankTexture(int meta)
{ {
String type = ""; String type = "";
switch (meta) switch (ColorCode.get(meta))
{ {
case 1: case RED:
type = "Lava"; type = "Lava";
break; break;
case 4: case BLUE:
type = "Water"; type = "Water";
break; break;
case 13: case WHITE:
type = "Milk"; type = "Milk";
break; break;
case 14: case ORANGE:
type = "Steam"; type = "Steam";
break; break;
default: default:
@ -105,13 +105,13 @@ public class RenderTank extends TileEntitySpecialRenderer
public static String getGuageTexture(int meta, int pos) public static String getGuageTexture(int meta, int pos)
{ {
String type = ""; String type = "";
switch (meta) switch (ColorCode.get(meta))
{ {
case 1: case RED:
type = "Lava"; type = "Lava";
break; break;
case 12: case BLUE:
type = "Fuel"; type = "Water";
break; break;
default: default:
type = ""; type = "";
@ -124,15 +124,15 @@ public class RenderTank extends TileEntitySpecialRenderer
public static String getCornerTexture(int meta) public static String getCornerTexture(int meta)
{ {
String type = ""; String type = "";
switch (meta) switch (ColorCode.get(meta))
{ {
case 1: case RED:
type = "Lava"; type = "Lava";
break; break;
case 4: case BLUE:
type = "Water"; type = "Water";
break; break;
case 13: case WHITE:
type = "Milk"; type = "Milk";
break; break;
default: default: