Record Class FluidIngredient.FluidValue
java.lang.Object
java.lang.Record
earth.terrarium.botarium.common.fluid.utils.FluidIngredient.FluidValue
- All Implemented Interfaces:
FluidIngredient.Value
- Enclosing class:
- FluidIngredient
public static record FluidIngredient.FluidValue(net.minecraft.world.level.material.Fluid fluid)
extends Record
implements FluidIngredient.Value
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidIngredient.FluidValue> -
Constructor Summary
ConstructorsConstructorDescriptionFluidValue(net.minecraft.world.level.material.Fluid fluid) Creates an instance of aFluidValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.material.Fluidfluid()Returns the value of thefluidrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
FluidValue
public FluidValue(net.minecraft.world.level.material.Fluid fluid) Creates an instance of aFluidValuerecord class.- Parameters:
fluid- the value for thefluidrecord component
-
-
Method Details
-
getFluids
- Specified by:
getFluidsin interfaceFluidIngredient.Value
-
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). -
fluid
public net.minecraft.world.level.material.Fluid fluid()Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-