Package net.nullved.pmweatherapi.util
Class StringProperty
java.lang.Object
net.minecraft.world.level.block.state.properties.Property<StringValue>
net.nullved.pmweatherapi.util.StringProperty
public class StringProperty
extends net.minecraft.world.level.block.state.properties.Property<StringValue>
- Since:
- 0.14.15.6
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.properties.Property
net.minecraft.world.level.block.state.properties.Property.Value<T extends Comparable<T>> -
Constructor Summary
ConstructorsConstructorDescriptionStringProperty(String name, Collection<StringValue> values) Creates a new string property with the given name and values -
Method Summary
Modifier and TypeMethodDescriptionstatic StringPropertycreate(String name, Collection<StringValue> values) Creates a newStringPropertyfrom the given name and valuesstatic StringPropertycreate(String name, StringValue... values) Creates a newStringPropertyfrom the given name and valuesbooleanTests whether thisStringPropertyis equal to anotherObjectintGenerates a hashcode for thisStringPropertygetName(StringValue value) Gets the name of the givenStringValue.Gets the possible values for this propertyGets the associatedStringValuefor theStringvalueMethods inherited from class net.minecraft.world.level.block.state.properties.Property
codec, getAllValues, getName, getValueClass, hashCode, parseValue, toString, value, value, valueCodec
-
Constructor Details
-
StringProperty
Creates a new string property with the given name and values- Parameters:
name- The name of the propertyvalues- ACollectionof possibleStringValues- Since:
- 0.14.15.6
-
-
Method Details
-
getPossibleValues
Gets the possible values for this property- Specified by:
getPossibleValuesin classnet.minecraft.world.level.block.state.properties.Property<StringValue>- Returns:
- The
Collectionof possibleStringValues - Since:
- 0.14.15.6
-
getValue
Gets the associatedStringValuefor theStringvalue- Specified by:
getValuein classnet.minecraft.world.level.block.state.properties.Property<StringValue>- Parameters:
value- The value in string format- Returns:
- An
OptionalStringValue - Since:
- 0.14.15.6
-
getName
Gets the name of the givenStringValue. In this case, returnsStringValue.getSerializedName()- Specified by:
getNamein classnet.minecraft.world.level.block.state.properties.Property<StringValue>- Parameters:
value- TheStringValue- Returns:
- The serialized name of the
StringValue - Since:
- 0.14.15.6
-
equals
Tests whether thisStringPropertyis equal to anotherObject- Overrides:
equalsin classnet.minecraft.world.level.block.state.properties.Property<StringValue>- Parameters:
other- The reference object with which to compare- Returns:
trueif the otherObjectis equal to thisStringProperty,falseotherwise- Since:
- 0.14.15.6
-
generateHashCode
public int generateHashCode()Generates a hashcode for thisStringProperty- Overrides:
generateHashCodein classnet.minecraft.world.level.block.state.properties.Property<StringValue>- Returns:
- The generated hashcode
- Since:
- 0.14.15.6
-
create
Creates a newStringPropertyfrom the given name and values- Parameters:
name- The property namevalues- The acceptedStringValues- Returns:
- A new
StringProperty - Since:
- 0.14.15.6
-
create
Creates a newStringPropertyfrom the given name and values- Parameters:
name- The property namevalues- ACollectionof acceptedStringValues- Returns:
- A new
StringProperty - Since:
- 0.14.15.6
-