diff --git a/src/main/java/resonantinduction/api/fluid/FluidMixingEvent.java b/src/main/java/resonantinduction/api/events/FluidMixingEvent.java similarity index 98% rename from src/main/java/resonantinduction/api/fluid/FluidMixingEvent.java rename to src/main/java/resonantinduction/api/events/FluidMixingEvent.java index 2f7b13d95..a9c69c9b1 100644 --- a/src/main/java/resonantinduction/api/fluid/FluidMixingEvent.java +++ b/src/main/java/resonantinduction/api/events/FluidMixingEvent.java @@ -1,4 +1,4 @@ -package resonantinduction.api.fluid; +package resonantinduction.api.events; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; diff --git a/src/main/java/resonantinduction/api/fluid/INetworkFluidPart.java b/src/main/java/resonantinduction/api/fluid/INetworkFluidPart.java index c1a66c20c..bcf0ef6b0 100644 --- a/src/main/java/resonantinduction/api/fluid/INetworkFluidPart.java +++ b/src/main/java/resonantinduction/api/fluid/INetworkFluidPart.java @@ -1,6 +1,5 @@ package resonantinduction.api.fluid; -import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; @@ -30,30 +29,4 @@ public interface INetworkFluidPart extends IFluidHandler, INetworkPart * is used so the network has a direct method to access the pipes internal fluid storage */ public FluidStack drainTankContent(int index, int volume, boolean doDrain); - - /** - * Can the fluid pass from one side to the next. Used by path finder to see if the fluid can - * move threw the pipes. - * - * @param fluid - fluid that is trying to pass threw - * @param from - direction the fluid is coming from - * @param to - direction the fluid is going to - * - * @Note only do logic in the method as it may be called many times and expect no change from - * the pipes or world. - * @return true will let the fluid pass. - */ - public boolean canPassThrew(FluidStack fluid, ForgeDirection from, ForgeDirection to); - - /** - * Called while the fluid is passing threw the pipe. This is the pipes chance to modify the - * fluid or react to the fluid - * - * @param fluid - fluid that is trying to pass threw - * @param from - direction the fluid is coming from - * @param to - direction the fluid is going to - * @return true if something happened to completely stop the fluid from moving. Eg. pipe blew - * up, or jammed - */ - public boolean onPassThrew(FluidStack fluid, ForgeDirection from, ForgeDirection to); } diff --git a/src/main/java/resonantinduction/mechanical/fluid/pipe/TilePipe.java b/src/main/java/resonantinduction/mechanical/fluid/pipe/TilePipe.java index 25d11cb48..38f82d6d5 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/pipe/TilePipe.java +++ b/src/main/java/resonantinduction/mechanical/fluid/pipe/TilePipe.java @@ -100,14 +100,6 @@ public class TilePipe extends TileFluidNetwork implements IColorCoded, INetworkP } - @Override - public boolean onPassThrew(FluidStack fluid, ForgeDirection from, ForgeDirection to) - { - // TODO do checks for molten pipe so that fluids like water turn into steam, oils and fuels - // burn - return super.onPassThrew(fluid, from, to); - } - @Override public double getMaxPressure(ForgeDirection side) { diff --git a/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java b/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java index 2f5fe16fa..ee9217cde 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java +++ b/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java @@ -310,52 +310,6 @@ public abstract class TileFluidNetwork extends TileEntityFluidDevice implements return type == Connection.FLUIDS || type == Connection.NETWORK; } - @Override - public boolean canPassThrew(FluidStack fluid, ForgeDirection from, ForgeDirection to) - { - return this.connectedBlocks.get(from.ordinal()) != null && this.connectedBlocks.get(to.ordinal()) != null && this.damage < this.maxDamage; - } - - @Override - public boolean onPassThrew(FluidStack fluid, ForgeDirection from, ForgeDirection to) - { - FluidContainerMaterial mat = FluidContainerMaterial.get(this.getBlockMetadata()); - if (fluid != null && fluid.getFluid() != null && mat != null) - { - if (fluid.getFluid().isGaseous(fluid) && !mat.canSupportGas) - { - // TODO lose 25% of the gas, and render the escaping gas as a particle effect - this.getTileNetwork().drainNetworkTank(this.worldObj, (int) (fluid.amount * .05), true); - } - else if (FluidMasterList.isMolten(fluid.getFluid()) && !mat.canSupportMoltenFluids) - { - // TODO start to heat up the pipe to melting point. When it hits melting point turn - // the pipe to its molten metal equal - // TODO also once it reaches a set heat level start burning up blocks around the - // pipe such as wood - // this.heat += FluidMasterList.getHeatPerPass(fluid.getFluid()); - if (heat >= this.maxHeat) - { - this.worldObj.setBlock(xCoord, yCoord, zCoord, Block.fire.blockID); - return true; - } - } - else if (!fluid.getFluid().isGaseous(fluid) && !mat.canSupportFluids) - { - this.damage += 1; - if (this.damage >= this.maxDamage) - { - // TODO test this and make sure its right, as well black fluid block in some - // cases - this.getBlockType().dropBlockAsItem(worldObj, xCoord, yCoord, zCoord, 0, 0); - this.worldObj.setBlock(xCoord, yCoord, zCoord, 0); - return true; - } - } - } - return false; - } - @Override public void readFromNBT(NBTTagCompound nbt) {