Interface IProgrammable

All Known Implementing Classes:
DroneItem, NetworkComponentItem

public interface IProgrammable
Implement this for items that can get programmed in a Programmer.

For now the only thing you can do with this is make program storages; in future, there may be more applications. Puzzle pieces will be written onto the implementer's itemstack NBT, under the NBT tag "pneumaticcraft:progWidgets".

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canProgram(net.minecraft.world.item.ItemStack stack)
    When returned true, this stack may be programmed.
    boolean
    Check if the item should have a tooltip added detailing the puzzle piece used to program it.
    boolean
    usesPieces(net.minecraft.world.item.ItemStack stack)
    Check if Programming Puzzles are needed to program this item.
  • Field Details

  • Method Details

    • canProgram

      boolean canProgram(net.minecraft.world.item.ItemStack stack)
      When returned true, this stack may be programmed. Can be used to limit programmability by NBT data, for example.
      Parameters:
      stack - the item stack to check
      Returns:
      true if the item can be programmed, false otherwise
    • usesPieces

      boolean usesPieces(net.minecraft.world.item.ItemStack stack)
      Check if Programming Puzzles are needed to program this item. When returned false, it's free to program. Drones and Network API's return true in PneumaticCraft, Network Storages return false.
      Parameters:
      stack - the item stack to check
      Returns:
      true if puzzle pieces are required by the Programmer to program the item
    • showProgramTooltip

      boolean showProgramTooltip()
      Check if the item should have a tooltip added detailing the puzzle piece used to program it.
      Returns:
      true if the item should have tooltip information added