Fixed odd code change
Some how two numbers got switched causing the entire render to fail. Not sure how these numbers got changed as i have not messed with them since i wrote them. As well the code worked before last commit...
This commit is contained in:
parent
eaf3138055
commit
5d9a51f6d4
3 changed files with 3 additions and 6 deletions
|
@ -53,7 +53,7 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler
|
||||||
}
|
}
|
||||||
else if (block.blockID == FluidMech.blockTank.blockID)
|
else if (block.blockID == FluidMech.blockTank.blockID)
|
||||||
{
|
{
|
||||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(metadata == 2 ? "/textures/blocks/obsidian.png" : "/textures/blocks/stonebrick.png"));
|
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(metadata == 1 ? "/textures/blocks/obsidian.png" : "/textures/blocks/stonebrick.png"));
|
||||||
GL11.glTranslatef((float) 0.0F, (float) -0.9F, (float) 0.0F);
|
GL11.glTranslatef((float) 0.0F, (float) -0.9F, (float) 0.0F);
|
||||||
tank.render(0.0625F, false, false, false, false);
|
tank.render(0.0625F, false, false, false, false);
|
||||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class RenderTank extends TileEntitySpecialRenderer
|
||||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float var8)
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float var8)
|
||||||
{
|
{
|
||||||
LiquidStack liquid = tileEntity instanceof TileEntityTank ? ((TileEntityTank) tileEntity).getTank().getLiquid() : null;
|
LiquidStack liquid = tileEntity instanceof TileEntityTank ? ((TileEntityTank) tileEntity).getTank().getLiquid() : null;
|
||||||
this.renderTank(tileEntity, x, y, z, -1, liquid);
|
this.renderTank(tileEntity, x, y, z, 0, liquid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderTank(TileEntity tileEntity, double x, double y, double z, int meta, LiquidStack liquid)
|
public void renderTank(TileEntity tileEntity, double x, double y, double z, int meta, LiquidStack liquid)
|
||||||
|
@ -38,9 +38,6 @@ public class RenderTank extends TileEntitySpecialRenderer
|
||||||
if (tileEntity instanceof TileEntityTank)
|
if (tileEntity instanceof TileEntityTank)
|
||||||
{
|
{
|
||||||
render = ((TileEntityTank) tileEntity).renderConnection;
|
render = ((TileEntityTank) tileEntity).renderConnection;
|
||||||
}
|
|
||||||
if (meta == -1 && tileEntity instanceof TileEntityTank)
|
|
||||||
{
|
|
||||||
color = ((TileEntityTank) tileEntity).getColor();
|
color = ((TileEntityTank) tileEntity).getColor();
|
||||||
}
|
}
|
||||||
if (liquid != null && liquid.amount > 0)
|
if (liquid != null && liquid.amount > 0)
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class TileEntityTank extends TileEntityFluidDevice implements ITankContai
|
||||||
{
|
{
|
||||||
if (!this.worldObj.isRemote)
|
if (!this.worldObj.isRemote)
|
||||||
{
|
{
|
||||||
this.renderConnection[side.ordinal()] = tileEntity instanceof TileEntityTank && ((TileEntityTank) tileEntity).getColor() == this.getColor() ? 1 : (tileEntity instanceof INetworkPipe ? 1 : tileEntity != null ? 3 : 0);
|
this.renderConnection[side.ordinal()] = tileEntity instanceof TileEntityTank && ((TileEntityTank) tileEntity).getColor() == this.getColor() ? 2 : (tileEntity instanceof INetworkPipe ? 1 : tileEntity != null ? 3 : 0);
|
||||||
|
|
||||||
if (tileEntity != null)
|
if (tileEntity != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue