Package net.minecraft.predicate
Record Class FluidPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.FluidPredicate
- Record Components:
fluids-state-
public record FluidPredicate(Optional<RegistryEntryList<Fluid>> fluids, Optional<StatePredicate> state)
extends Record
- Mappings:
Namespace Name official byintermediary net/minecraft/class_4551named net/minecraft/predicate/FluidPredicateofficial bintermediary comp_2372named fluidsofficial cintermediary comp_1782named state
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidPredicate> private final Optional<RegistryEntryList<Fluid>> The field for thefluidsrecord component.private final Optional<StatePredicate> The field for thestaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFluidPredicate(Optional<RegistryEntryList<Fluid>> optional, Optional<StatePredicate> optional2) -
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.state()Returns the value of thestaterecord component.booleantest(ServerWorld world, BlockPos pos) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
fluids
The field for thefluidsrecord component. -
state
The field for thestaterecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLby;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<RegistryEntryList<Fluid>> optional, Optional<StatePredicate> optional2)
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLby;a(Lapu;Lid;)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). -
fluids
Returns the value of thefluidsrecord component.- Returns:
- the value of the
fluidsrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-