Class ImageWidgetBuilder
java.lang.Object
xyz.gmitch215.socketmc.screen.builder.WidgetBuilder<ImageWidgetBuilder,ImageWidget>
xyz.gmitch215.socketmc.screen.builder.ImageWidgetBuilder
Represents a builder for an
ImageWidget
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the widget.static @NotNull ImageWidgetBuilder
builder()
Creates a new ImageWidgetBuilder.image
(@NotNull Identifier image) Sets the image for the widget.type
(ImageWidget.Type type) Sets the type of the image.
-
Method Details
-
image
Sets the image for the widget.- Parameters:
image
- Image Identifier- Returns:
- this class, for chaining
- Throws:
IllegalArgumentException
- if image is null
-
type
Sets the type of the image.- Parameters:
type
- Image Type- Returns:
- this class, for chaining
- Throws:
IllegalArgumentException
- if type is null
-
build
Description copied from class:WidgetBuilder
Builds the widget.- Specified by:
build
in classWidgetBuilder<ImageWidgetBuilder,
ImageWidget> - Returns:
- The built widget.
-
builder
Creates a new ImageWidgetBuilder.- Returns:
ImageWidget
Builder
-