Class TextureBuilder

java.lang.Object
xyz.gmitch215.socketmc.instruction.builder.TextureBuilder
All Implemented Interfaces:
HUDBuilder<TextureBuilder>, InstructionBuilder

public final class TextureBuilder extends Object implements HUDBuilder<TextureBuilder>
  • Method Details

    • texture

      Sets the texture to draw.
      Parameters:
      texture - Texture Identifier
      Returns:
      this class, for chaining
    • x

      @NotNull public @NotNull TextureBuilder x(int x)
      Description copied from interface: HUDBuilder
      Sets the X coordinate of the element.
      Specified by:
      x in interface HUDBuilder<TextureBuilder>
      Parameters:
      x - X coordinate, in pixels
      Returns:
      this class, for chaining
    • y

      @NotNull public @NotNull TextureBuilder y(int y)
      Description copied from interface: HUDBuilder
      Sets the Y coordinate of the element.
      Specified by:
      y in interface HUDBuilder<TextureBuilder>
      Parameters:
      y - Y coordinate, in pixels
      Returns:
      this class, for chaining
    • argb

      @Deprecated public TextureBuilder argb(int argb)
      Deprecated.
      Unsupported
      Description copied from interface: HUDBuilder
      Sets the color of the element using ARGB format.
      Specified by:
      argb in interface HUDBuilder<TextureBuilder>
      Parameters:
      argb - Color in ARGB
      Returns:
      this class, for chaining
    • duration

      public TextureBuilder duration(long millis)
      Description copied from interface: HUDBuilder
      Sets the duration the element should be displayed for.
      Specified by:
      duration in interface HUDBuilder<TextureBuilder>
      Parameters:
      millis - Duration, in milliseconds
      Returns:
      this class, for chaining
    • width

      @NotNull public @NotNull TextureBuilder width(int width)
      Sets the width of the texture.
      Parameters:
      width - Texture Width, in pixels
      Returns:
      this class, for chaining
    • height

      @NotNull public @NotNull TextureBuilder height(int height)
      Sets the height of the texture.
      Parameters:
      height - Texture Height, in pixels
      Returns:
      this class, for chaining
    • regionWidth

      @NotNull public @NotNull TextureBuilder regionWidth(int regionWidth)
      Sets the width of the region to draw.
      Parameters:
      regionWidth - Region Width, in pixels
      Returns:
      this class, for chaining
    • regionHeight

      @NotNull public @NotNull TextureBuilder regionHeight(int regionHeight)
      Sets the height of the region to draw.
      Parameters:
      regionHeight - Region Height, in pixels
      Returns:
      this class, for chaining
    • startTop

      @NotNull public @NotNull TextureBuilder startTop(int startTop)
      Sets where to start drawing from the top of the texture.
      Parameters:
      startTop - Start Top Amount, in pixels
      Returns:
      this class, for chaining
    • startLeft

      @NotNull public @NotNull TextureBuilder startLeft(int startLeft)
      Sets where to start drawing from the left of the texture.
      Parameters:
      startLeft - Start Left Amount, in pixels
      Returns:
      this class, for chaining
    • build

      @NotNull public @NotNull Instruction build()
      Description copied from interface: InstructionBuilder
      Builds the instruction.
      Specified by:
      build in interface InstructionBuilder
      Returns:
      Constructed Instruction for this Builder