Class TextureBuilder
java.lang.Object
xyz.gmitch215.socketmc.instruction.builder.TextureBuilder
- All Implemented Interfaces:
HUDBuilder<TextureBuilder>,InstructionBuilder
Builder for
Instruction.DRAW_TEXTURE.-
Method Summary
Modifier and TypeMethodDescriptionargb(int argb) Deprecated.Unsupportedbuild()Builds the instruction.duration(long millis) Sets the duration the element should be displayed for.height(int height) Sets the height of the texture.regionHeight(int regionHeight) Sets the height of the region to draw.regionWidth(int regionWidth) Sets the width of the region to draw.startLeft(int startLeft) Sets where to start drawing from the left of the texture.startTop(int startTop) Sets where to start drawing from the top of the texture.texture(@NotNull Identifier texture) Sets the texture to draw.width(int width) Sets the width of the texture.x(int x) Sets the X coordinate of the element.y(int y) Sets the Y coordinate of the element.
-
Method Details
-
texture
Sets the texture to draw.- Parameters:
texture- Texture Identifier- Returns:
- this class, for chaining
-
x
Description copied from interface:HUDBuilderSets the X coordinate of the element.- Specified by:
xin interfaceHUDBuilder<TextureBuilder>- Parameters:
x- X coordinate, in pixels- Returns:
- this class, for chaining
-
y
Description copied from interface:HUDBuilderSets the Y coordinate of the element.- Specified by:
yin interfaceHUDBuilder<TextureBuilder>- Parameters:
y- Y coordinate, in pixels- Returns:
- this class, for chaining
-
argb
Deprecated.UnsupportedDescription copied from interface:HUDBuilderSets the color of the element using ARGB format.- Specified by:
argbin interfaceHUDBuilder<TextureBuilder>- Parameters:
argb- Color in ARGB- Returns:
- this class, for chaining
-
duration
Description copied from interface:HUDBuilderSets the duration the element should be displayed for.- Specified by:
durationin interfaceHUDBuilder<TextureBuilder>- Parameters:
millis- Duration, in milliseconds- Returns:
- this class, for chaining
-
width
Sets the width of the texture.- Parameters:
width- Texture Width, in pixels- Returns:
- this class, for chaining
-
height
Sets the height of the texture.- Parameters:
height- Texture Height, in pixels- Returns:
- this class, for chaining
-
regionWidth
Sets the width of the region to draw.- Parameters:
regionWidth- Region Width, in pixels- Returns:
- this class, for chaining
-
regionHeight
Sets the height of the region to draw.- Parameters:
regionHeight- Region Height, in pixels- Returns:
- this class, for chaining
-
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
Sets where to start drawing from the left of the texture.- Parameters:
startLeft- Start Left Amount, in pixels- Returns:
- this class, for chaining
-
build
Description copied from interface:InstructionBuilderBuilds the instruction.- Specified by:
buildin interfaceInstructionBuilder- Returns:
- Constructed Instruction for this Builder
-