Package net.minecraft.predicate
Record Class FluidPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.FluidPredicate
- Record Components:
tag-fluid-state-
public record FluidPredicate(Optional<TagKey<Fluid>> tag, Optional<RegistryEntry<Fluid>> fluid, Optional<StatePredicate> state)
extends Record
- Mappings:
Namespace Name official bwintermediary net/minecraft/class_4551named net/minecraft/predicate/FluidPredicateofficial bintermediary comp_1780named tagofficial cintermediary comp_1781named fluidofficial dintermediary comp_1782named state
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidPredicate>private final Optional<RegistryEntry<Fluid>>The field for thefluidrecord component.private final Optional<StatePredicate>The field for thestaterecord component.The field for thetagrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFluidPredicate(Optional<TagKey<Fluid>> optional, Optional<RegistryEntry<Fluid>> optional2, Optional<StatePredicate> optional3) -
Method Summary
Modifier 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.state()Returns the value of thestaterecord component.tag()Returns the value of thetagrecord component.booleantest(ServerWorld world, BlockPos pos) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tag
The field for thetagrecord component. -
fluid
The field for thefluidrecord component. -
state
The field for thestaterecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLbw;a:Lcom/mojang/serialization/Codec;intermediary field_45753Lnet/minecraft/class_4551;field_45753:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/predicate/FluidPredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
FluidPredicate
public FluidPredicate(Optional<TagKey<Fluid>> optional, Optional<RegistryEntry<Fluid>> optional2, Optional<StatePredicate> optional3)
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLbw;a(Land;Lhx;)Zintermediary method_22475Lnet/minecraft/class_4551;method_22475(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Znamed testLnet/minecraft/predicate/FluidPredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Z
-
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). -
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-
fluid
Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-