Examples of TankManager


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);

        switch (id) {
            case 10:
                tile.setCookTime(data);
                break;
View Full Code Here

Examples of mods.railcraft.common.fluids.TankManager

    }

    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();
        TankManager tMan = tile.getTankManager();
        if (tMan != null) {
            tMan.updateGuiData(this, crafters, 0);
        }
    }
View Full Code Here

Examples of mods.railcraft.common.fluids.TankManager

    }

    @Override
    public void addCraftingToCrafters(ICrafting icrafting) {
        super.addCraftingToCrafters(icrafting);
        TankManager tMan = tile.getTankManager();
        if (tMan != null) {
            tMan.initGuiData(this, icrafting, 0);
        }
    }
View Full Code Here

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

Examples of mods.railcraft.common.fluids.TankManager

                }
            }
        }

        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

Examples of mods.railcraft.common.fluids.TankManager

    @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

Examples of mods.railcraft.common.fluids.TankManager

    @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

Examples of mods.railcraft.common.fluids.TankManager

    @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

Examples of mods.railcraft.common.fluids.TankManager

        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

Examples of mods.railcraft.common.fluids.TankManager

    }

    @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
TOP
Copyright © 2018 www.massapi.com. 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.