Fixed some pipe connection issues

This commit is contained in:
DarkGuardsman 2013-12-30 21:13:48 -05:00
parent ad64c2ec06
commit 8c70ae0042
5 changed files with 14 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 960 B

View file

@ -48,7 +48,7 @@ public class RenderPipe extends TileEntitySpecialRenderer
}
else
{
this.render(FluidPartsMaterial.STONE, 0, new boolean[6]);
this.render(mat, 0, new boolean[6]);
}
GL11.glPopMatrix();

View file

@ -40,11 +40,20 @@ public class TileEntityPipe extends TileEntityFluidNetworkTile implements IColor
@Override
public void validateConnectionSide(TileEntity tileEntity, ForgeDirection side)
{
super.validateConnectionSide(tileEntity, side);
int meta = new Vector3(this).getBlockMetadata(this.worldObj);
if (meta < FluidPartsMaterial.values().length)
{
FluidPartsMaterial pipeMat = FluidPartsMaterial.values()[meta];
if (pipeMat == FluidPartsMaterial.WOOD || pipeMat == FluidPartsMaterial.STONE)
{
if (side == ForgeDirection.UP)
{
return;
}
}
}
if (tileEntity instanceof TileEntityPipe)
{
int meta = new Vector3(this).getBlockMetadata(this.worldObj);
int metaOther = new Vector3(tileEntity).getBlockMetadata(this.worldObj);
if (meta < FluidPartsMaterial.values().length && metaOther < FluidPartsMaterial.values().length)
{
@ -133,7 +142,7 @@ public class TileEntityPipe extends TileEntityFluidNetworkTile implements IColor
}
/** Calculates flow rate based on viscosity & temp of the fluid as all other factors are know
*
*
* @param fluid - fluidStack
* @param temp = tempature of the fluid
* @param pressure - pressure difference of were the fluid is flowing too.