Package net.minecraft.inventory

Examples of net.minecraft.inventory.ICrafting


    ItemStack is = workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
    if ( Platform.isServer() )
    {
      for (Object crafter : this.crafters)
      {
        ICrafting icrafting = (ICrafting) crafter;

        if ( prevStack != is )
        {
          // if the bars changed an item was probably made, so just send shit!
          for (Object s : inventorySlots)
          {
            if ( s instanceof OptionalSlotRestrictedInput )
            {
              OptionalSlotRestrictedInput sri = (OptionalSlotRestrictedInput) s;
              icrafting.sendSlotContents( this, sri.slotNumber, sri.getStack() );
            }
          }
          ((EntityPlayerMP) icrafting).isChangingQuantityOnly = false;
        }
      }
View Full Code Here


  {
    if ( s == patternSlotOUT && Platform.isServer() )
    {
      for (Object crafter : this.crafters)
      {
        ICrafting icrafting = (ICrafting) crafter;

        for (Object g : inventorySlots)
        {
          if ( g instanceof OptionalSlotFake || g instanceof SlotFakeCraftingMatrix )
          {
            Slot sri = (Slot) g;
            icrafting.sendSlotContents( this, sri.slotNumber, sri.getStack() );
          }
        }
        ((EntityPlayerMP) icrafting).isChangingQuantityOnly = false;
      }
      detectAndSendChanges();
View Full Code Here

          wirelessOut.putStack( term );

          // update the two slots in question...
          for (Object crafter : this.crafters)
          {
            ICrafting icrafting = (ICrafting) crafter;
            icrafting.sendSlotContents( this, wirelessIn.slotNumber, wirelessIn.getStack() );
            icrafting.sendSlotContents( this, wirelessOut.slotNumber, wirelessOut.getStack() );
          }
        }

      }
    }
View Full Code Here

  {
    for (Object c : this.crafters)
    {
      if ( c instanceof ICrafting )
      {
        ICrafting cr = (ICrafting) c;
        queueInventory( cr );
      }
    }
  }
View Full Code Here

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

        for (SyncData sd : syncData.values())
          sd.tick( icrafting );
      }
    }
View Full Code Here

    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();

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

            int lock = router.getLockController().getCurrentState();
            if (this.lastLockState != lock)
                var2.sendProgressBarUpdate(this, 0, lock);

            int railwayType = router.getRoutingController().getCurrentState();
            if (this.lastRoutingState != railwayType)
                var2.sendProgressBarUpdate(this, 1, railwayType);
        }

        this.lastLockState = router.getLockController().getCurrentState();
        this.lastRoutingState = router.getRoutingController().getCurrentState();
    }
View Full Code Here

        super.detectAndSendChanges();
        tile.getTankManager().updateGuiData(this, crafters, 0);
        tile.getTankManager().updateGuiData(this, crafters, 1);

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

            if (this.lastBurnTime != tile.boiler.burnTime)
                var2.sendProgressBarUpdate(this, 10, (int) Math.round(tile.boiler.burnTime));

            if (this.lastItemBurnTime != tile.boiler.currentItemBurnTime)
                var2.sendProgressBarUpdate(this, 11, (int) Math.round(tile.boiler.currentItemBurnTime));

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

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

            if (this.lastHeat != tile.boiler.getHeat())
                var2.sendProgressBarUpdate(this, 14, (int) Math.round(tile.boiler.getHeat()));
        }

        this.lastBurnTime = tile.boiler.burnTime;
        this.lastItemBurnTime = tile.boiler.currentItemBurnTime;
        this.lastEnergy = tile.energy;
View Full Code Here

    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();

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

            LocoSpeed speed = loco.getSpeed();
            if (this.lastSpeed != speed)
                var2.sendProgressBarUpdate(this, 10, speed.ordinal());

            LocoMode mode = loco.getMode();
            if (this.lastMode != mode)
                var2.sendProgressBarUpdate(this, 11, mode.ordinal());

            int lock = loco.getLockController().getCurrentState();
            if (this.lastLockState != lock)
                var2.sendProgressBarUpdate(this, 12, lock);
        }

        this.lastSpeed = loco.getSpeed();
        this.lastMode = loco.getMode();
        this.lastLockState = loco.getLockController().getCurrentState();
View Full Code Here

    @Override
    public void detectAndSendChanges() {
        super.detectAndSendChanges();

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

            int lock = track.getLockController().getCurrentState();
            if (this.lastLockState != lock)
                var2.sendProgressBarUpdate(this, 0, lock);
        }

        this.lastLockState = track.getLockController().getCurrentState();
    }
View Full Code Here

            tMan.updateGuiData(this, crafters, 1);
            tMan.updateGuiData(this, crafters, 2);
        }

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

            if (this.lastBurnTime != tile.boiler.burnTime)
                var2.sendProgressBarUpdate(this, 10, (int) Math.round(tile.boiler.burnTime));

            if (this.lastItemBurnTime != tile.boiler.currentItemBurnTime)
                var2.sendProgressBarUpdate(this, 11, (int) Math.round(tile.boiler.currentItemBurnTime));

            if (this.lastHeat != tile.boiler.getHeat())
                var2.sendProgressBarUpdate(this, 12, (int) Math.round(tile.boiler.getHeat()));

            if (this.wasBurning != tile.boiler.isBurning())
                var2.sendProgressBarUpdate(this, 13, tile.boiler.isBurning() ? 1 : 0);
        }

        this.lastBurnTime = tile.boiler.burnTime;
        this.lastItemBurnTime = tile.boiler.currentItemBurnTime;
        this.lastHeat = tile.boiler.getHeat();
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.