Record Class StatePropertiesPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.StatePropertiesPredicate
public record StatePropertiesPredicate(List<StatePropertiesPredicate.PropertyMatcher> properties)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static final recordprivate static final recordprivate static final recordprivate 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<?, ?> states) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(BlockState state) <S extends StateHolder<?,S>>
booleanmatches(StateDefinition<?, S> definition, S state) booleanmatches(FluidState state) 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
-
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). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-