Class WidgetBuilderImpl<SELF extends WidgetBuilder<SELF,T>,T>
java.lang.Object
net.replaceitem.reconfigure.config.widget.builder.WidgetBuilderImpl<SELF,T>
- All Implemented Interfaces:
WidgetBuilder<SELF,T>
- Direct Known Subclasses:
AbstractTextFieldWidgetBuilderImpl,CheckboxWidgetBuilderImpl,ChipListWidgetBuilderImpl,ColorPickerWidgetBuilderImpl,CustomWidgetBuilderImpl,CyclingButtonWidgetBuilderImpl,SliderWidgetBuilderImpl
public abstract class WidgetBuilderImpl<SELF extends WidgetBuilder<SELF,T>,T>
extends Object
implements WidgetBuilder<SELF,T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable net.minecraft.text.Textprotected final PropertyBuilderImpl<?, T> protected @Nullable net.minecraft.text.Text -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWidgetBuilderImpl(PropertyBuildContext propertyBuildContext, PropertyBuilderImpl<?, T> propertyBuilder) -
Method Summary
Modifier and TypeMethodDescriptionfinal PropertyImpl<T> build()Builds the widget and the property.protected PropertyHolder<T> buildImpl(PropertyHolder<T> property) protected abstract ConfigWidgetFactory<T> buildWidgetFactory(BaseSettings baseSettings) displayName(net.minecraft.text.Text displayName) Sets the display name of the widget as rendered in the config screen.protected voidpostBuild(PropertyHolder<T> property) This is run afterbuildImpl(PropertyHolder)to add the created Property to the tab.protected voidpreBuild(PropertyHolder<T> property) This is run before callingbuildImpl(PropertyHolder).protected SELFself()tooltip()Enabled the tooltip for the widget.tooltip(net.minecraft.text.Text tooltip) Sets the tooltip text for the widget.
-
Field Details
-
propertyBuilder
-
displayName
@Nullable protected @Nullable net.minecraft.text.Text displayName -
tooltip
@Nullable protected @Nullable net.minecraft.text.Text tooltip
-
-
Constructor Details
-
WidgetBuilderImpl
protected WidgetBuilderImpl(PropertyBuildContext propertyBuildContext, PropertyBuilderImpl<?, T> propertyBuilder)
-
-
Method Details
-
displayName
Description copied from interface:WidgetBuilderSets the display name of the widget as rendered in the config screen. When not set, defaults to a translatable text with keyreconfigure.property.[namespace].[propertyname].- Specified by:
displayNamein interfaceWidgetBuilder<SELF extends WidgetBuilder<SELF,T>, T> - Parameters:
displayName- The display name text- Returns:
- The builder for chaining
-
tooltip
Description copied from interface:WidgetBuilderSets the tooltip text for the widget. This is shown when hovering over the property display name in the config widget.- Specified by:
tooltipin interfaceWidgetBuilder<SELF extends WidgetBuilder<SELF,T>, T> - Parameters:
tooltip- The tooltip text- Returns:
- The builder for chaining
-
tooltip
Description copied from interface:WidgetBuilderEnabled the tooltip for the widget. The text of the tooltip will default to a translatable text with keyreconfigure.property.[namespace].[propertyname].tooltip.- Specified by:
tooltipin interfaceWidgetBuilder<SELF extends WidgetBuilder<SELF,T>, T> - Returns:
- The builder for chaining
-
preBuild
This is run before callingbuildImpl(PropertyHolder). Can be used to fill in missing default values. -
postBuild
This is run afterbuildImpl(PropertyHolder)to add the created Property to the tab. -
build
Description copied from interface:WidgetBuilderBuilds the widget and the property. The built widget and property is automatically added to the config tab on which this builder was created.- Specified by:
buildin interfaceWidgetBuilder<SELF extends WidgetBuilder<SELF,T>, T> - Returns:
- The built property
-
buildImpl
-
buildWidgetFactory
-
self
-