Fixed an issue with tank render
This commit is contained in:
parent
23dc4f8073
commit
9686422ff4
1 changed files with 22 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue