Package forestry.api.circuits

Examples of forestry.api.circuits.ICircuitBoard


    farmLogics = new IFarmLogic[] { new FarmLogicArboreal(this), new FarmLogicArboreal(this), new FarmLogicArboreal(this), new FarmLogicArboreal(this) };

    // See whether we have socketed stuff.
    ItemStack chip = sockets.getStackInSlot(0);
    if (chip != null) {
      ICircuitBoard chipset = ChipsetManager.circuitRegistry.getCircuitboard(chip);
      if (chipset != null)
        chipset.onLoad(this);
    }
  }
View Full Code Here


      return;

    // Dispose correctly of old chipsets
    if (sockets.getStackInSlot(slot) != null)
      if (ChipsetManager.circuitRegistry.isChipset(sockets.getStackInSlot(slot))) {
        ICircuitBoard chipset = ChipsetManager.circuitRegistry.getCircuitboard(sockets.getStackInSlot(slot));
        if (chipset != null)
          chipset.onRemoval(this);
      }

    sockets.setInventorySlotContents(slot, stack);
    refreshFarmLogics();

    if (stack == null) {
      return;
    }

    ICircuitBoard chipset = ChipsetManager.circuitRegistry.getCircuitboard(stack);
    if (chipset != null)
      chipset.onInsertion(this);
  }
View Full Code Here

  }

  @SuppressWarnings({"unchecked", "rawtypes"})
  @Override
  public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
    ICircuitBoard circuitboard = ChipsetManager.circuitRegistry.getCircuitboard(itemstack);
    if (circuitboard != null)
      circuitboard.addTooltip(list);
  }
View Full Code Here

    inventory.readFromNBT(nbttagcompound);
    sockets.readFromNBT(nbttagcompound);

    ItemStack chip = sockets.getStackInSlot(0);
    if (chip != null) {
      ICircuitBoard chipset = ChipsetManager.circuitRegistry.getCircuitboard(chip);
      if (chipset != null)
        chipset.onLoad(this);
    }
  }
View Full Code Here

      return;

    // Dispose correctly of old chipsets
    if (sockets.getStackInSlot(slot) != null)
      if (ChipsetManager.circuitRegistry.isChipset(sockets.getStackInSlot(slot))) {
        ICircuitBoard chipset = ChipsetManager.circuitRegistry.getCircuitboard(sockets.getStackInSlot(slot));
        if (chipset != null)
          chipset.onRemoval(this);
      }

    if (stack == null) {
      sockets.setInventorySlotContents(slot, stack);
      return;
    }

    sockets.setInventorySlotContents(slot, stack);

    ICircuitBoard chipset = ChipsetManager.circuitRegistry.getCircuitboard(stack);
    if (chipset != null)
      chipset.onInsertion(this);
  }
View Full Code Here

TOP

Related Classes of forestry.api.circuits.ICircuitBoard

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.