Interface WidgetFactory<P extends Property<?>>
- Type Parameters:
P- The specific type of property this factory supports.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface responsible for constructing a UI widget (
ConfigEntry)
that represents and interacts with a specific Property.-
Method Summary
Modifier and TypeMethodDescriptioncreate(P property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) Creates a new configuration entry widget.
-
Method Details
-
create
ConfigEntry create(P property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) Creates a new configuration entry widget.- Parameters:
property- The configuration property to be visually represented and modified.parentScreen- The parent configuration screen hosting this entry.minecraft- The active Minecraft client instance.onValueChanged- A callback to be invoked whenever the widget modifies the property's value.- Returns:
- A newly constructed
ConfigEntrybound to the provided property.
-