Package mods.railcraft.common.fluids

Examples of mods.railcraft.common.fluids.TankManager


        int height = getTankHeight(ironTank);
        float yOffset = height / 2f;
        float vScale = height - 2;
        float hScale = ironTank.getPattern().getPatternWidthX() - 2;

        TankManager tankManager = ironTank.getTankManager();
        if (tankManager == null)
            return;
        StandardTank tank = tankManager.get(0);
        if (tank == null)
            return;

        FluidStack fluidStack = tank.getFluid();
        if (fluidStack != null && fluidStack.amount > 0 && fluidStack.getFluid() != null) {
View Full Code Here


    }

    @Override
    protected void entityInit() {
        super.entityInit();
        tankManager = new TankManager();

        tankWater = new FilteredTank(FluidHelper.BUCKET_VOLUME * 6, Fluids.WATER.get());
        tankSteam = new FilteredTank(FluidHelper.BUCKET_VOLUME * 16, Fluids.STEAM.get());

        tankManager.add(tankWater);
View Full Code Here

    }

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

        icrafting.sendProgressBarUpdate(this, 10, (int) Math.round(tile.boiler.burnTime));
        icrafting.sendProgressBarUpdate(this, 11, (int) Math.round(tile.boiler.currentItemBurnTime));
        icrafting.sendProgressBarUpdate(this, 12, (int) Math.round(tile.boiler.getHeat()));
View Full Code Here

    }

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

        for (int var1 = 0; var1 < this.crafters.size(); ++var1) {
            ICrafting var2 = (ICrafting) this.crafters.get(var1);
View Full Code Here

    }

    @Override
    @SideOnly(Side.CLIENT)
    public void updateProgressBar(int id, int value) {
        TankManager tMan = tile.getTankManager();
        if (tMan != null)
            tMan.processGuiUpdate(id, value);

        switch (id) {
            case 10:
                tile.boiler.burnTime = value;
                break;
View Full Code Here

        return new SlotLiquidContainer(inv, id, x, y);
    }

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

        return 0;
    }

    @Override
    public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
        TankManager tMan = getTankManager();
        if (tMan != null) {
            return tMan.drain(from, 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) {
            return tMan.drain(from, resource, doDrain);
        }
        return null;
    }
View Full Code Here

        return null;
    }

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

    }

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

        icrafting.sendProgressBarUpdate(this, 10, (int) Math.round(tile.boiler.burnTime));
        icrafting.sendProgressBarUpdate(this, 11, (int) Math.round(tile.boiler.currentItemBurnTime));
        icrafting.sendProgressBarUpdate(this, 12, (int) Math.round(tile.boiler.getHeat()));
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.