Package net.minecraft.inventory

Examples of net.minecraft.inventory.ICrafting


    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();
        PowerReceiver provider = tile.getPowerReceiver(null);
        for (int i = 0; i < crafters.size(); i++) {
            ICrafting icrafting = (ICrafting) crafters.get(i);

            if (lastProcessTime != tile.getProcessTime())
                icrafting.sendProgressBarUpdate(this, 0, tile.getProcessTime());

            if (provider != null)
                icrafting.sendProgressBarUpdate(this, 1, (int) provider.getEnergyStored());
        }

        lastProcessTime = tile.getProcessTime();
    }
View Full Code Here


        }

        int cookTime = tile.cookTime;

        for (int i = 0; i < crafters.size(); i++) {
            ICrafting icrafting = (ICrafting) crafters.get(i);


            if (lastCookTime != cookTime) {
                icrafting.sendProgressBarUpdate(this, 10, cookTime);
            }
        }

        lastCookTime = cookTime;
    }
View Full Code Here

    public void detectAndSendChanges() {
        super.detectAndSendChanges();
        tile.getTankManager().updateGuiData(this, crafters, 0);

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

            if (this.lastEnergy != tile.energy)
                var2.sendProgressBarUpdate(this, 12, (int) Math.round(tile.energy));

            if (this.lastOutput != tile.currentOutput)
                var2.sendProgressBarUpdate(this, 13, Math.round(tile.currentOutput * 100));
        }

        this.lastEnergy = tile.energy;
        this.lastOutput = tile.currentOutput;
    }
View Full Code Here

    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();
        for (int i = 0; i < crafters.size(); i++) {
            ICrafting icrafting = (ICrafting) crafters.get(i);

            if (lastOutput != Math.round(tile.output))
                icrafting.sendProgressBarUpdate(this, 0, Math.round(tile.output));
        }
        lastOutput = Math.round(tile.output);
    }
View Full Code Here

    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();
        PowerReceiver provider = tile.getPowerReceiver(null);
        for (int i = 0; i < crafters.size(); i++) {
            ICrafting icrafting = (ICrafting) crafters.get(i);

            if (lastProgress != tile.getProgress())
                icrafting.sendProgressBarUpdate(this, 0, tile.getProgress());

            if (provider != null)
                icrafting.sendProgressBarUpdate(this, 1, (int) provider.getEnergyStored());
        }

        ItemStack output = tile.getStackInSlot(0);
        if (!InvTools.isItemEqualStrict(output, prevOutput)) {
            onCraftMatrixChanged(craftMatrix);
View Full Code Here

        FluidStack prev = prevFluidStacks.get(tankIndex);
        int color = tank.getColor();
        int pColor = prevColor.get(tankIndex);

        for (Object crafter1 : crafters) {
            ICrafting crafter = (ICrafting) crafter1;
            EntityPlayerMP player = (EntityPlayerMP) crafter1;
            if (fluidStack == null ^ prev == null) {
                int fluidId = -1;
                int fluidAmount = 0;
                if (fluidStack != null) {
                    fluidId = fluidStack.fluidID;
                    fluidAmount = fluidStack.amount;
                }
                crafter.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidId);
                PacketBuilder.instance().sendGuiIntegerPacket(player, container.windowId, tankIndex * NETWORK_DATA + 1, fluidAmount);
            } else if (fluidStack != null && prev != null) {
                if (fluidStack.getFluid() != prev.getFluid())
                    crafter.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidStack.fluidID);
                if (fluidStack.amount != prev.amount)
                    PacketBuilder.instance().sendGuiIntegerPacket(player, container.windowId, tankIndex * NETWORK_DATA + 1, fluidStack.amount);
                if (color != pColor)
                    PacketBuilder.instance().sendGuiIntegerPacket(player, container.windowId, tankIndex * NETWORK_DATA + 2, color);
            }
View Full Code Here

    {
        super.detectAndSendChanges();

        for (Object crafter : this.crafters)
        {
            ICrafting icrafting = (ICrafting) crafter;

            if (this.lastCookTime != this.tileEntityCalcinator.deviceCookTime)
            {
                icrafting.sendProgressBarUpdate(this, 0, this.tileEntityCalcinator.deviceCookTime);
            }

            if (this.lastBurnTime != this.tileEntityCalcinator.fuelBurnTime)
            {
                icrafting.sendProgressBarUpdate(this, 1, this.tileEntityCalcinator.fuelBurnTime);
            }

            if (this.lastItemCookTime != this.tileEntityCalcinator.itemCookTime)
            {
                icrafting.sendProgressBarUpdate(this, 2, this.tileEntityCalcinator.itemCookTime);
            }
        }

        this.lastCookTime = this.tileEntityCalcinator.deviceCookTime;
        this.lastBurnTime = this.tileEntityCalcinator.fuelBurnTime;
View Full Code Here

    {
        super.detectAndSendChanges();

        for (Object crafter : this.crafters)
        {
            ICrafting icrafting = (ICrafting) crafter;

            if (this.lastItemLearnTime != this.tileEntityResearchStation.itemLearnTime)
            {
                icrafting.sendProgressBarUpdate(this, 0, this.tileEntityResearchStation.itemLearnTime);
            }
        }

        this.lastItemLearnTime = this.tileEntityResearchStation.itemLearnTime;
    }
View Full Code Here

    {
        super.detectAndSendChanges();

        for (Object crafter : this.crafters)
        {
            ICrafting icrafting = (ICrafting) crafter;

            if (this.lastDeviceCookTime != this.tileEntityAludel.deviceCookTime)
            {
                icrafting.sendProgressBarUpdate(this, 0, this.tileEntityAludel.deviceCookTime);
            }

            if (this.lastFuelBurnTime != this.tileEntityAludel.fuelBurnTime)
            {
                icrafting.sendProgressBarUpdate(this, 1, this.tileEntityAludel.fuelBurnTime);
            }

            if (this.lastItemCookTime != this.tileEntityAludel.itemCookTime)
            {
                icrafting.sendProgressBarUpdate(this, 2, this.tileEntityAludel.itemCookTime);
            }
        }

        this.lastDeviceCookTime = this.tileEntityAludel.deviceCookTime;
        this.lastFuelBurnTime = this.tileEntityAludel.fuelBurnTime;
View Full Code Here

    {
        super.detectAndSendChanges();

        for (int i = 0; i < this.crafters.size(); ++i)
        {
            ICrafting icrafting = (ICrafting)this.crafters.get(i);

            if (this.lastCookTime != this.furnace.furnaceCookTime)
            {
                icrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime);
            }

            if (this.lastBurnTime != this.furnace.furnaceBurnTime)
            {
                icrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime);
            }

            if (this.lastItemBurnTime != this.furnace.currentItemBurnTime)
            {
                icrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime);
            }
        }

        this.lastCookTime = this.furnace.furnaceCookTime;
        this.lastBurnTime = this.furnace.furnaceBurnTime;
View Full Code Here

TOP

Related Classes of net.minecraft.inventory.ICrafting

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.