Examples of ICircuitBoard


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

Examples of forestry.api.circuits.ICircuitBoard

      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

Examples of forestry.api.circuits.ICircuitBoard

  }

  @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

Examples of forestry.api.circuits.ICircuitBoard

    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

Examples of forestry.api.circuits.ICircuitBoard

      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
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.