Record Class FluidPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.FluidPredicate
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidPredicate>The field for thefluidrecord component.private final Optional<StatePropertiesPredicate>The field for thepropertiesrecord component.The field for thetagrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionFluidPredicate(Optional<TagKey<Fluid>> tag, Optional<Holder<Fluid>> fluid, Optional<StatePropertiesPredicate> properties) Creates an instance of aFluidPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fluid()Returns the value of thefluidrecord component.final inthashCode()Returns a hash code value for this object.booleanmatches(ServerLevel p_41105_, BlockPos p_41106_) Returns the value of thepropertiesrecord component.tag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
tagThe field for thetagrecord component.
- 
fluidThe field for thefluidrecord component.
- 
propertiesThe field for thepropertiesrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
FluidPredicatepublic FluidPredicate(Optional<TagKey<Fluid>> tag, Optional<Holder<Fluid>> fluid, Optional<StatePropertiesPredicate> properties) Creates an instance of aFluidPredicaterecord class.- Parameters:
- tag- the value for the- tagrecord component
- fluid- the value for the- fluidrecord component
- properties- the value for the- propertiesrecord component
 
 
- 
- 
Method Details- 
matches
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
tagReturns the value of thetagrecord component.- Returns:
- the value of the tagrecord component
 
- 
fluidReturns the value of thefluidrecord component.- Returns:
- the value of the fluidrecord component
 
- 
propertiesReturns the value of thepropertiesrecord component.- Returns:
- the value of the propertiesrecord component
 
 
-