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 record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<KeyValueCondition> (package private) static final org.slf4j.Logger
private final Map
<String, KeyValueCondition.Terms> The field for thetests
record component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aKeyValueCondition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.<O,
S extends StateHolder<O, S>>
Predicate<S> instantiate
(StateDefinition<O, S> p_405000_) private static <O,
S extends StateHolder<O, S>>
Predicate<S> instantiate
(StateDefinition<O, S> p_405206_, String p_405083_, KeyValueCondition.Terms p_405754_) tests()
Returns the value of thetests
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
tests
The field for thetests
record component. -
LOGGER
static final org.slf4j.Logger LOGGER -
CODEC
-
-
Constructor Details
-
KeyValueCondition
Creates an instance of aKeyValueCondition
record class.- Parameters:
tests
- the value for thetests
record component
-
-
Method Details
-
instantiate
- Specified by:
instantiate
in interfaceCondition
-
instantiate
private static <O,S extends StateHolder<O, Predicate<S> instantiateS>> (StateDefinition<O, S> p_405206_, String p_405083_, KeyValueCondition.Terms p_405754_) -
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. -
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)
. -
tests
Returns the value of thetests
record component.- Returns:
- the value of the
tests
record component
-