public final class ListProperty extends StringProperty
| Constructor and Description |
|---|
ListProperty(int index,
java.lang.String[] values)
Constructs a new ListProperty with the index of the initial value from an array of valid values.
|
ListProperty(java.lang.String value,
java.lang.String[] values)
Constructs a new ListProperty with the String value of the initial value from an array of valid values.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Gets the string id specifying the property type.
|
java.lang.String[] |
getValues()
Gets the array of valid String values.
|
int |
indexOf(java.lang.String value)
Gets the index of the matching given value from the
values array. |
void |
visitEntryValue(EntryValuePropertyVisitor visitor,
int guiIdentifier,
java.lang.Object value,
net.minecraft.util.ResourceLocation registryKey)
Accept a GUI generator settings visitor for the property.
|
void |
visitFactory(FactoryPropertyVisitor visitor,
ModernBetaGeneratorSettings.Factory factory,
net.minecraft.util.ResourceLocation registryKey,
com.google.gson.JsonObject jsonObject)
Accept a Factory visitor for the property.
|
net.minecraft.client.gui.GuiPageButtonList.GuiListEntry |
visitGui(GuiPropertyVisitor visitor,
int guiIdentifier)
Accept a GUI visitor for the property.
|
java.lang.String |
visitNameFormatter(PropertyVisitor visitor)
Accept a name formatter visitor for the property.
|
getFormatterpublic ListProperty(int index,
java.lang.String[] values)
index - Index of the initial value from values.values - Array of valid String values.public ListProperty(java.lang.String value,
java.lang.String[] values)
value - The initial value from values.values - Array of valid String values.public java.lang.String getType()
PropertygetType in class StringPropertypublic void visitFactory(FactoryPropertyVisitor visitor, ModernBetaGeneratorSettings.Factory factory, net.minecraft.util.ResourceLocation registryKey, com.google.gson.JsonObject jsonObject)
PropertyvisitFactory in class StringPropertyvisitor - The property visitor.factory - The generator settings factory.registryKey - The registry key associated with this property.jsonObject - The JSON object to read/write the property from/to.public net.minecraft.client.gui.GuiPageButtonList.GuiListEntry visitGui(GuiPropertyVisitor visitor, int guiIdentifier)
PropertyvisitGui in class StringPropertyvisitor - The property visitor.guiIdentifier - The id of the GUI button.public void visitEntryValue(EntryValuePropertyVisitor visitor, int guiIdentifier, java.lang.Object value, net.minecraft.util.ResourceLocation registryKey)
PropertyvisitEntryValue in class StringPropertyvisitor - The property visitor.guiIdentifier - The id of the GUI button.value - The value to set.registryKey - The registry key associated with this property.public java.lang.String visitNameFormatter(PropertyVisitor visitor)
PropertyvisitNameFormatter in class StringPropertyvisitor - The property visitor.public java.lang.String[] getValues()