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:HUDBuilder
Sets the X coordinate of the element.- Specified by:
x
in interfaceHUDBuilder<TextureBuilder>
- Parameters:
x
- X coordinate, in pixels- Returns:
- this class, for chaining
-
y
Description copied from interface:HUDBuilder
Sets the Y coordinate of the element.- Specified by:
y
in interfaceHUDBuilder<TextureBuilder>
- Parameters:
y
- Y coordinate, in pixels- Returns:
- this class, for chaining
-
argb
Deprecated.UnsupportedDescription copied from interface:HUDBuilder
Sets the color of the element using ARGB format.- Specified by:
argb
in interfaceHUDBuilder<TextureBuilder>
- Parameters:
argb
- Color in ARGB- Returns:
- this class, for chaining
-
duration
Description copied from interface:HUDBuilder
Sets the duration the element should be displayed for.- Specified by:
duration
in 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:InstructionBuilder
Builds the instruction.- Specified by:
build
in interfaceInstructionBuilder
- Returns:
- Constructed Instruction for this Builder
-