Class EnumPropertyBuilderImpl<T>
java.lang.Object
net.replaceitem.reconfigure.config.property.builder.PropertyBuilderImpl<EnumPropertyBuilder<T>,T>
net.replaceitem.reconfigure.config.property.builder.EnumPropertyBuilderImpl<T>
- All Implemented Interfaces:
EnumPropertyBuilder<T>
,PropertyBuilder<EnumPropertyBuilder<T>,
T>
public class EnumPropertyBuilderImpl<T>
extends PropertyBuilderImpl<EnumPropertyBuilder<T>,T>
implements EnumPropertyBuilder<T>
-
Field Summary
Fields inherited from class net.replaceitem.reconfigure.config.property.builder.PropertyBuilderImpl
defaultValue, id, propertyBuildContext, validators
-
Constructor Summary
ConstructorsConstructorDescriptionEnumPropertyBuilderImpl
(PropertyBuildContext propertyBuildContext, net.minecraft.util.Identifier id, Collection<T> values) -
Method Summary
Modifier and TypeMethodDescriptionFinishes building the enum property and starts building a cycling button widget for it.protected TypeAdapter
<T, Intermediary.IntermediaryString> protected void
preBuild()
This is run before callingPropertyBuilderImpl.buildImpl()
.Methods inherited from class net.replaceitem.reconfigure.config.property.builder.PropertyBuilderImpl
addValidator, asCustomWidget, build, buildImpl, defaultValue, getId, postBuild, self
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.replaceitem.reconfigure.api.property.PropertyBuilder
addValidator, asCustomWidget, defaultValue
-
Constructor Details
-
EnumPropertyBuilderImpl
public EnumPropertyBuilderImpl(PropertyBuildContext propertyBuildContext, net.minecraft.util.Identifier id, Collection<T> values)
-
-
Method Details
-
asCyclingButton
Description copied from interface:EnumPropertyBuilder
Finishes building the enum property and starts building a cycling button widget for it. A cycling button widget is a button that cycles through all possible enum values when clicked. The returned widget builder can then be used to configure the widget. To finish building the widget, useWidgetBuilder.build()
which will return the created property.- Specified by:
asCyclingButton
in interfaceEnumPropertyBuilder<T>
- Returns:
- The cycling button widget builder
-
getTypeAdapter
- Specified by:
getTypeAdapter
in classPropertyBuilderImpl<EnumPropertyBuilder<T>,
T>
-
preBuild
protected void preBuild()Description copied from class:PropertyBuilderImpl
This is run before callingPropertyBuilderImpl.buildImpl()
. Can be used to fill in missing default values or validate values.- Overrides:
preBuild
in classPropertyBuilderImpl<EnumPropertyBuilder<T>,
T>
-