Record Class KeyValueCondition.Terms
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.multipart.KeyValueCondition.Terms
- Enclosing class:
KeyValueCondition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<KeyValueCondition.Terms> private final List<KeyValueCondition.Term> The field for theentriesrecord component.private static final Joinerprivate static final com.mojang.serialization.Codec<String> private static final charprivate static final Splitter -
Constructor Summary
ConstructorsConstructorDescriptionTerms(List<KeyValueCondition.Term> entries) Creates an instance of aTermsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.private <T extends Comparable<T>>
TgetValueOrThrow(Object pOwner, Property<T> pProperty, String pValue) final inthashCode()Returns a hash code value for this object.private <T extends Comparable<T>>
Predicate<T> instantiate(Object pOwner, Property<T> pProperty, KeyValueCondition.Term pTerm) <O,S extends StateHolder<O, S>, T extends Comparable<T>>
Predicate<S> instantiate(O pOwner, Property<T> pProperty) static com.mojang.serialization.DataResult<KeyValueCondition.Terms> toString()Returns a string representation of this record class.
-
Field Details
-
entries
The field for theentriesrecord component. -
SEPARATOR
private static final char SEPARATOR- See Also:
-
JOINER
-
SPLITTER
-
LEGACY_REPRESENTATION_CODEC
-
CODEC
-
-
Constructor Details
-
Terms
Creates an instance of aTermsrecord class.- Parameters:
entries- the value for theentriesrecord component
-
-
Method Details
-
parse
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
instantiate
public <O,S extends StateHolder<O, Predicate<S> instantiateS>, T extends Comparable<T>> (O pOwner, Property<T> pProperty) -
getValueOrThrow
private <T extends Comparable<T>> T getValueOrThrow(Object pOwner, Property<T> pProperty, String pValue) -
instantiate
private <T extends Comparable<T>> Predicate<T> instantiate(Object pOwner, Property<T> pProperty, KeyValueCondition.Term pTerm) -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-