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 voidpreBuild()This is run before callingPropertyBuilderImpl.buildImpl().Methods inherited from class net.replaceitem.reconfigure.config.property.builder.PropertyBuilderImpl
addValidator, asCustomWidget, build, buildImpl, buildWithoutWidget, defaultValue, getId, postBuild, selfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.replaceitem.reconfigure.api.property.PropertyBuilder
addValidator, asCustomWidget, buildWithoutWidget, defaultValue
-
Constructor Details
-
EnumPropertyBuilderImpl
public EnumPropertyBuilderImpl(PropertyBuildContext propertyBuildContext, net.minecraft.util.Identifier id, Collection<T> values)
-
-
Method Details
-
asCyclingButton
Description copied from interface:EnumPropertyBuilderFinishes 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:
asCyclingButtonin interfaceEnumPropertyBuilder<T>- Returns:
- The cycling button widget builder
-
getTypeAdapter
- Specified by:
getTypeAdapterin classPropertyBuilderImpl<EnumPropertyBuilder<T>,T>
-
preBuild
protected void preBuild()Description copied from class:PropertyBuilderImplThis is run before callingPropertyBuilderImpl.buildImpl(). Can be used to fill in missing default values or validate values.- Overrides:
preBuildin classPropertyBuilderImpl<EnumPropertyBuilder<T>,T>
-