Record Class StatePropertiesPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.StatePropertiesPredicate
public record StatePropertiesPredicate(List<StatePropertiesPredicate.PropertyMatcher> properties)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static final record(package private) static final record(package private) static final record(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StatePropertiesPredicate> private final List<StatePropertiesPredicate.PropertyMatcher> The field for thepropertiesrecord component.private static final com.mojang.serialization.Codec<List<StatePropertiesPredicate.PropertyMatcher>> static final StreamCodec<io.netty.buffer.ByteBuf, StatePropertiesPredicate> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aStatePropertiesPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncheckState(StateDefinition<?, ?> p_298590_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(BlockState p_67668_) <S extends StateHolder<?,S>>
booleanmatches(StateDefinition<?, S> p_67670_, S p_67671_) booleanmatches(FluidState p_67685_) Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
properties
The field for thepropertiesrecord component. -
PROPERTIES_CODEC
private static final com.mojang.serialization.Codec<List<StatePropertiesPredicate.PropertyMatcher>> PROPERTIES_CODEC -
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
StatePropertiesPredicate
Creates an instance of aStatePropertiesPredicaterecord class.- Parameters:
properties- the value for thepropertiesrecord component
-
-
Method Details
-
matches
-
matches
-
matches
-
checkState
-
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). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-