Record Class FluidMixing
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.resource.fluid.FluidMixing
What a placed fluid does when it meets other fluids: the first rule whose
FluidMixing.Selector matches
decides; without a match, both stop (FluidReaction.STOP). Read at runtime.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne rule: when the fluid already there matcheswith,reactiondecides.static interfaceWhich fluids a rule is about. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FluidMixingNo rules: a fluid stops where it meets another one. -
Constructor Summary
ConstructorsConstructorDescriptionFluidMixing(@NotNull List<FluidMixing.Rule> rules) Creates an instance of aFluidMixingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull FluidReactionreactionWith(@NotNull ResourceType present, @NotNull ResourceTags tags) The reaction againstpresent, given the current resource tags.@NotNull List<FluidMixing.Rule> rules()Returns the value of therulesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STOP
No rules: a fluid stops where it meets another one.
-
-
Constructor Details
-
FluidMixing
Creates an instance of aFluidMixingrecord class.- Parameters:
rules- the value for therulesrecord component
-
-
Method Details
-
reactionWith
@NotNull public @NotNull FluidReaction reactionWith(@NotNull @NotNull ResourceType present, @NotNull @NotNull ResourceTags tags) The reaction againstpresent, given the current resource tags. -
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). -
rules
Returns the value of therulesrecord component.- Returns:
- the value of the
rulesrecord component
-