Removed IConnectionProvide from pipes
This commit is contained in:
parent
13bf76a170
commit
b873cb2cb1
6 changed files with 21 additions and 23 deletions
|
@ -90,8 +90,6 @@ public class FluidMech extends DummyModContainer
|
|||
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVIS_VERSION + "." + BUILD_VERSION;
|
||||
|
||||
// @NetworkMod
|
||||
public static final boolean USES_CLIENT = true;
|
||||
public static final boolean USES_SERVER = false;
|
||||
public static final String CHANNEL = "FluidMech";
|
||||
|
||||
@Metadata(FluidMech.MOD_ID)
|
||||
|
|
|
@ -578,12 +578,6 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
return this.connectedBlocks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir)
|
||||
{
|
||||
return worldObj.getBlockTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetZ, zCoord + dir.offsetY) instanceof IFluidNetworkPart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTankSize()
|
||||
{
|
||||
|
|
|
@ -112,13 +112,6 @@ public class TileEntityEndPipe extends TileEntityFluidDevice implements INetwork
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection direction)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, LiquidStack resource, boolean doFill)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,6 @@ import net.minecraftforge.liquids.LiquidContainerRegistry;
|
|||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import universalelectricity.core.block.IConnectionProvider;
|
||||
import universalelectricity.core.path.Pathfinder;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
@ -562,7 +561,7 @@ public class HydraulicNetwork
|
|||
// as needed
|
||||
}
|
||||
|
||||
public void splitNetwork(World world, IConnectionProvider splitPoint)
|
||||
public void splitNetwork(World world, IFluidNetworkPart splitPoint)
|
||||
{
|
||||
if (splitPoint instanceof TileEntity)
|
||||
{
|
||||
|
@ -578,15 +577,15 @@ public class HydraulicNetwork
|
|||
{
|
||||
TileEntity connectedBlockA = connectedBlocks[i];
|
||||
|
||||
if (connectedBlockA instanceof IConnectionProvider)
|
||||
if (connectedBlockA instanceof IFluidNetworkPart)
|
||||
{
|
||||
for (int pipeCount = 0; pipeCount < connectedBlocks.length; pipeCount++)
|
||||
{
|
||||
final TileEntity connectedBlockB = connectedBlocks[pipeCount];
|
||||
|
||||
if (connectedBlockA != connectedBlockB && connectedBlockB instanceof IConnectionProvider)
|
||||
if (connectedBlockA != connectedBlockB && connectedBlockB instanceof IFluidNetworkPart)
|
||||
{
|
||||
Pathfinder finder = new PathfinderCheckerPipes(world, (IConnectionProvider) connectedBlockB, splitPoint);
|
||||
Pathfinder finder = new PathfinderCheckerPipes(world, (IFluidNetworkPart) connectedBlockB, splitPoint);
|
||||
finder.init(new Vector3(connectedBlockA));
|
||||
|
||||
if (finder.results.size() > 0)
|
||||
|
|
|
@ -2,6 +2,7 @@ package hydraulic.fluidnetwork;
|
|||
|
||||
import hydraulic.api.IColorCoded;
|
||||
import hydraulic.api.IPipeConnection;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
|
@ -13,7 +14,7 @@ import universalelectricity.core.block.IConnectionProvider;
|
|||
* that doesn't change the over all network pressure. So pipes, gauges, tubes, buffers, decor
|
||||
* blocks.
|
||||
*/
|
||||
public interface IFluidNetworkPart extends IPipeConnection, IColorCoded, IConnectionProvider, ITankContainer
|
||||
public interface IFluidNetworkPart extends IPipeConnection, IColorCoded, ITankContainer
|
||||
{
|
||||
/**
|
||||
* gets the devices pressure from a given side for input
|
||||
|
@ -51,5 +52,19 @@ public interface IFluidNetworkPart extends IPipeConnection, IColorCoded, IConnec
|
|||
public ILiquidTank getTank();
|
||||
|
||||
public void setTankContent(LiquidStack stack);
|
||||
|
||||
/**
|
||||
* Gets a list of all the connected TileEntities that this conductor is connected to. The
|
||||
* array's length should be always the 6 adjacent wires.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public TileEntity[] getAdjacentConnections();
|
||||
|
||||
/**
|
||||
* Instantly refreshes all connected blocks around the conductor, recalculating the connected
|
||||
* blocks.
|
||||
*/
|
||||
public void updateAdjacentConnections();
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.Set;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.block.IConnectionProvider;
|
||||
import universalelectricity.core.path.IPathCallBack;
|
||||
import universalelectricity.core.path.Pathfinder;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
@ -17,7 +16,7 @@ import universalelectricity.core.vector.Vector3;
|
|||
*/
|
||||
public class PathfinderCheckerPipes extends Pathfinder
|
||||
{
|
||||
public PathfinderCheckerPipes(final World world, final IConnectionProvider targetConnector, final IConnectionProvider... ignoreConnector)
|
||||
public PathfinderCheckerPipes(final World world, final IFluidNetworkPart targetConnector, final IFluidNetworkPart... ignoreConnector)
|
||||
{
|
||||
super(new IPathCallBack()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue