Model3D toReturn = new Model3D();
toReturn.baseBlock = Blocks.water;
toReturn.setTexture(gas.getIcon());
DisplayInteger display = DisplayInteger.createAndStart();
if(cachedGasses.containsKey(side))
{
cachedGasses.get(side).put(gas, display);
}
else {
HashMap<Gas, DisplayInteger> map = new HashMap<Gas, DisplayInteger>();
map.put(gas, display);
cachedGasses.put(side, map);
}
switch(side)
{
case NORTH:
{
toReturn.minX = 0.625 + offset;
toReturn.minY = 0.0625 + offset;
toReturn.minZ = 0.625 + offset;
toReturn.maxX = 0.8125 - offset;
toReturn.maxY = 0.9375 - offset;
toReturn.maxZ = 0.8125 - offset;
break;
}
case SOUTH:
{
toReturn.minX = 0.1875 + offset;
toReturn.minY = 0.0625 + offset;
toReturn.minZ = 0.1875 + offset;
toReturn.maxX = 0.375 - offset;
toReturn.maxY = 0.9375 - offset;
toReturn.maxZ = 0.375 - offset;
break;
}
case WEST:
{
toReturn.minX = 0.625 + offset;
toReturn.minY = 0.0625 + offset;
toReturn.minZ = 0.1875 + offset;
toReturn.maxX = 0.8125 - offset;
toReturn.maxY = 0.9375 - offset;
toReturn.maxZ = 0.375 - offset;
break;
}
case EAST:
{
toReturn.minX = 0.1875 + offset;
toReturn.minY = 0.0625 + offset;
toReturn.minZ = 0.625 + offset;
toReturn.maxX = 0.375 - offset;
toReturn.maxY = 0.9375 - offset;
toReturn.maxZ = 0.8125 - offset;
break;
}
}
MekanismRenderer.renderObject(toReturn);
display.endList();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
return display;
}