Class LogicBlock

All Implemented Interfaces:
Comparable<Content>, Senseable

public class LogicBlock extends Block
  • Field Details

    • maxInstructionScale

      public int maxInstructionScale
    • instructionsPerTick

      public int instructionsPerTick
    • maxInstructionsPerTick

      public int maxInstructionsPerTick
    • range

      public float range
  • Constructor Details

    • LogicBlock

      public LogicBlock(String name)
  • Method Details

    • checkForceDark

      public boolean checkForceDark(Tile tile)
      Overrides:
      checkForceDark in class Block
    • accessible

      public boolean accessible()
    • canBreak

      public boolean canBreak(Tile tile)
      Overrides:
      canBreak in class Block
      Returns:
      whether this block can be broken on the specified tile.
    • getLinkName

      public static String getLinkName(Block block)
    • compress

      public static byte[] compress(String code, Seq<LogicBlock.LogicLink> links)
    • compress

      public static byte[] compress(byte[] bytes, Seq<LogicBlock.LogicLink> links)
    • setStats

      public void setStats()
      Description copied from class: UnlockableContent
      Initializes stats on demand. Should only be called once. Only called before something is displayed.
      Overrides:
      setStats in class Block
    • drawPlace

      public void drawPlace(int x, int y, int rotation, boolean valid)
      Description copied from class: Block
      Drawn when you are placing a block.
      Overrides:
      drawPlace in class Block
    • pointConfig

      public Object pointConfig(Object config, Cons<Point2> transformer)
      Description copied from class: Block
      Transforms the internal position of this config using the specified function, and return the result.
      Overrides:
      pointConfig in class Block