Interface Autotiler

All Known Implementing Classes:
ArmoredConduit, ArmoredConveyor, Conduit, Conveyor, Duct, StackConveyor

public interface Autotiler
  • Method Details

    • sliced

      default TextureRegion sliced(TextureRegion input, Autotiler.SliceMode mode)
      Parameters:
      input - The TextureRegion to be sliced
      mode - The SliceMode to be applied
      Returns:
      The sliced texture
    • topHalf

      default TextureRegion topHalf(TextureRegion input)
      Returns:
      The top half of the input
    • botHalf

      default TextureRegion botHalf(TextureRegion input)
      Returns:
      The bottom half of the input
    • getTiling

      @Nullable default int[] getTiling(BuildPlan req, Eachable<BuildPlan> list)
    • buildBlending

      default int[] buildBlending(Tile tile, int rotation, BuildPlan[] directional, boolean world)
      Returns:
      an array of blending values: [0]: the type of connection: - 0: straight - 1: curve (top) - 2: straight (bottom) - 3: all sides - 4: straight (top) [1]: X scale [2]: Y scale [3]: a 4-bit mask with bits 0-3 indicating blend state in that direction (0 being 0 degrees, 1 being 90, etc) [4]: same as [3] but only blends with non-square sprites
    • transformCase

      default void transformCase(int num, int[] bits)
      Transforms the autotiler setting the connection and the y-scale
      Parameters:
      num - The number to use to transform the array
      bits - The blending value array
    • facing

      default boolean facing(int x, int y, int rotation, int x2, int y2)
      Check if a position is facing the secondary position at a rotation
      Parameters:
      x - The x coordinate of position 1
      y - The y coordinate of position 1
      rotation - The rotation of the tile on (x, y)
      x2 - The x coordinate of position 2
      y2 - The y coordinate of position 2
      Returns:
      If position 1 is facing position 2 at a certain angle
    • blends

      default boolean blends(Tile tile, int rotation, @Nullable BuildPlan[] directional, int direction, boolean checkWorld)
    • blends

      default boolean blends(Tile tile, int rotation, int direction)
    • blendsArmored

      default boolean blendsArmored(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock)
    • notLookingAt

      default boolean notLookingAt(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock)
      Returns:
      whether this other block is *not* looking at this one.
    • lookingAtEither

      default boolean lookingAtEither(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock)
      Returns:
      whether this tile is looking at the other tile, or the other tile is looking at this one. If the other tile does not rotate, it is always considered to be facing this one.
    • lookingAt

      default boolean lookingAt(Tile tile, int rotation, int otherx, int othery, Block otherblock)
      Check if a position is facing the secondary position at a rotation
      Parameters:
      tile - The origin tile that is or is not facing the `otherblock`
      rotation - The rotation of the tile on (x, y)
      otherx - The x coordinate of position 2
      othery - The y coordinate of position 2
      Returns:
      whether this tile is looking at the other tile.
    • blends

      boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock)