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 ImageWidgetBuilderbuilder()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:WidgetBuilderBuilds the widget.- Specified by:
buildin classWidgetBuilder<ImageWidgetBuilder,ImageWidget> - Returns:
- The built widget.
-
builder
Creates a new ImageWidgetBuilder.- Returns:
ImageWidgetBuilder
-