Class BuildPayload

java.lang.Object
mindustry.world.blocks.payloads.BuildPayload
All Implemented Interfaces:
Position, Payload

public class BuildPayload extends Object implements Payload
  • Field Details

    • build

      public mindustry.gen.Building build
  • Constructor Details

    • BuildPayload

      public BuildPayload(Block block, Team team)
    • BuildPayload

      public BuildPayload(mindustry.gen.Building build)
  • Method Details

    • block

      public Block block()
    • place

      public void place(Tile tile)
    • place

      public void place(Tile tile, int rotation)
    • content

      public UnlockableContent content()
      Specified by:
      content in interface Payload
      Returns:
      content describing this payload (block or unit)
    • update

      public void update(@Nullable mindustry.gen.Unit unitHolder, @Nullable mindustry.gen.Building buildingHolder)
      Description copied from interface: Payload
      update this payload inside a container unit or building. either can be null.
      Specified by:
      update in interface Payload
    • requirements

      public ItemStack[] requirements()
      Specified by:
      requirements in interface Payload
      Returns:
      the items needed to make this payload; may be empty.
    • buildTime

      public float buildTime()
      Specified by:
      buildTime in interface Payload
      Returns:
      the time taken to build this payload.
    • x

      public float x()
      Specified by:
      x in interface Payload
    • y

      public float y()
      Specified by:
      y in interface Payload
    • size

      public float size()
      Specified by:
      size in interface Payload
      Returns:
      hitbox size of the payload.
    • write

      public void write(Writes write)
      Description copied from interface: Payload
      writes the payload for saving.
      Specified by:
      write in interface Payload
    • set

      public void set(float x, float y, float rotation)
      Description copied from interface: Payload
      sets this payload's position on the map.
      Specified by:
      set in interface Payload
    • drawShadow

      public void drawShadow(float alpha)
      Specified by:
      drawShadow in interface Payload
    • draw

      public void draw()
      Description copied from interface: Payload
      draws this payload at a position.
      Specified by:
      draw in interface Payload
    • icon

      public TextureRegion icon()
      Specified by:
      icon in interface Payload
      Returns:
      icon describing the contents.