Record Class FluidPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.FluidPredicate
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidPredicate> The field for thefluidsrecord component.private final Optional<StatePropertiesPredicate> The field for thepropertiesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFluidPredicate(Optional<HolderSet<Fluid>> fluids, Optional<StatePropertiesPredicate> properties) Creates an instance of aFluidPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fluids()Returns the value of thefluidsrecord component.final inthashCode()Returns a hash code value for this object.booleanmatches(ServerLevel level, BlockPos pos) Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
fluids
-
properties
The field for thepropertiesrecord component. -
CODEC
-
-
Constructor Details
-
FluidPredicate
public FluidPredicate(Optional<HolderSet<Fluid>> fluids, Optional<StatePropertiesPredicate> properties) Creates an instance of aFluidPredicaterecord class.- Parameters:
fluids- the value for thefluidsrecord componentproperties- the value for thepropertiesrecord component
-
-
Method Details
-
matches
-
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). -
fluids
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-