Fixed an issue with tank render

This commit is contained in:
DarkGuardsman 2013-12-04 15:09:37 -05:00
parent 23dc4f8073
commit 9686422ff4

View file

@ -1,6 +1,12 @@
package dark.fluid.common.machines;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
import dark.api.fluid.INetworkFluidPart;
import dark.api.tilenetwork.INetworkPart;
import dark.api.tilenetwork.ITileNetwork;
import dark.api.tilenetwork.ITileConnector.Connection;
import dark.core.prefab.tilenetwork.fluid.NetworkFluidContainers;
import dark.fluid.common.prefab.TileEntityFluidNetworkTile;
@ -29,4 +35,20 @@ public class TileEntityTank extends TileEntityFluidNetworkTile
this.network = (NetworkFluidContainers) network;
}
}
public void validateConnectionSide(TileEntity tileEntity, ForgeDirection side)
{
if (!this.worldObj.isRemote)
{
if (tileEntity instanceof TileEntityTank)
{
if (this.canTileConnect(Connection.NETWORK, side.getOpposite()))
{
this.getTileNetwork().mergeNetwork(((INetworkFluidPart) tileEntity).getTileNetwork(), (INetworkPart) tileEntity);
this.renderConnection[side.ordinal()] = true;
connectedBlocks.add(tileEntity);
}
}
}
}
}