Package mods.railcraft.common.fluids

Examples of mods.railcraft.common.fluids.TankManager


    }

    @Override
    @SideOnly(Side.CLIENT)
    public void updateProgressBar(int id, int data) {
        TankManager tMan = tile.getTankManager();
        if (tMan != null) {
            tMan.processGuiUpdate(id, data);
        }
    }
View Full Code Here


                }
            }
        }

        if (getPatternPositionY() - getPattern().getMasterOffsetY() == 0) {
            TankManager tMan = getTankManager();
            if (tMan != null)
                tMan.outputLiquid(tileCache, FLUID_OUTPUT_FILTER, FLUID_OUTPUTS, 0, FLOW_RATE);
        }
    }
View Full Code Here

    @Override
    public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
        if (!canFill(from, null))
            return 0;
        if (resource == null || resource.amount <= 0) return 0;
        TankManager tMan = getTankManager();
        if (tMan == null)
            return 0;
        resource = resource.copy();
        resource.amount = Math.min(resource.amount, FLOW_RATE);
        int filled = tMan.fill(0, resource, doFill);
        if (filled > 0 && doFill)
            setFilling(resource.copy());
        return filled;
    }
View Full Code Here

    @Override
    public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
        if (getPatternPositionY() - getPattern().getMasterOffsetY() != 1)
            return null;
        TankManager tMan = getTankManager();
        if (tMan != null) {
            maxDrain = Math.min(maxDrain, FLOW_RATE);
            return tMan.drain(0, maxDrain, doDrain);
        }
        return null;
    }
View Full Code Here

    @Override
    public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
        if (resource == null)
            return null;
        TankManager tMan = getTankManager();
        if (tMan != null && tMan.get(0).getFluidType() == resource.getFluid())
            return drain(from, resource.amount, doDrain);
        return null;
    }
View Full Code Here

        return getPatternPositionY() - getPattern().getMasterOffsetY() <= 1;
    }

    @Override
    public FluidTankInfo[] getTankInfo(ForgeDirection side) {
        TankManager tMan = getTankManager();
        if (tMan != null)
            return tMan.getTankInfo();
        return FakeTank.INFO;
    }
View Full Code Here

    }

    @Override
    public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
        if (resource == null) return 0;
        TankManager tMan = getTankManager();
        if (tMan == null)
            return 0;
        return tMan.fill(0, resource, doFill);
    }
View Full Code Here

        return false;
    }

    @Override
    public FluidTankInfo[] getTankInfo(ForgeDirection dir) {
        TankManager tMan = getTankManager();
        if (tMan != null)
            return tMan.getTankInfo();
        return FakeTank.INFO;
    }
View Full Code Here

                    WorldPlugin.addBlockEvent(worldObj, xCoord, yCoord, zCoord, getBlockType(), 1, gaugeState);
                }
            }
        }

        TankManager tMan = getTankManager();
        if (tMan != null)
            tMan.outputLiquid(getOutputs(), 0, WATER_OUTPUT);
    }
View Full Code Here

        return null;
    }

    @Override
    public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
        TankManager tMan = getTankManager();
        if (tMan != null) return tMan.fill(TANK_STEAM, resource, doFill);
        return 0;
    }
View Full Code Here

TOP

Related Classes of mods.railcraft.common.fluids.TankManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.