Record Class KeyValueCondition
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.multipart.KeyValueCondition
- All Implemented Interfaces:
Condition
public record KeyValueCondition(Map<String, KeyValueCondition.Terms> tests)
extends Record
implements Condition
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<KeyValueCondition> private static final org.slf4j.Loggerprivate final Map<String, KeyValueCondition.Terms> The field for thetestsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aKeyValueConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<O, S extends StateHolder<O,S>>
Predicate<S> instantiate(StateDefinition<O, S> definition) private static <O, S extends StateHolder<O,S>>
Predicate<S> instantiate(StateDefinition<O, S> definition, String key, KeyValueCondition.Terms valueTest) tests()Returns the value of thetestsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tests
The field for thetestsrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
-
Constructor Details
-
KeyValueCondition
Creates an instance of aKeyValueConditionrecord class.- Parameters:
tests- the value for thetestsrecord component
-
-
Method Details
-
instantiate
- Specified by:
instantiatein interfaceCondition
-
instantiate
private static <O, S extends StateHolder<O,S>> Predicate<S> instantiate(StateDefinition<O, S> definition, String key, KeyValueCondition.Terms valueTest) -
toString
-
hashCode
-
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). -
tests
Returns the value of thetestsrecord component.- Returns:
- the value of the
testsrecord component
-