Record Class BnCFluidIngredient
java.lang.Object
java.lang.Record
com.petrolpark.compat.brewinandchewin.BnCFluidIngredient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Decoder<BnCFluidIngredient> static final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionBnCFluidIngredient(net.neoforged.neoforge.fluids.crafting.FluidIngredient ingredient, int amount, String unit) Creates an instance of aBnCFluidIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.Optional<com.simibubi.create.foundation.fluid.FluidIngredient> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.neoforged.neoforge.fluids.crafting.FluidIngredientReturns the value of theingredientrecord component.final StringtoString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Field Details
-
UNIT_LITERS
- See Also:
-
UNIT_MILLIBUCKETS
- See Also:
-
DECODER
-
-
Constructor Details
-
BnCFluidIngredient
public BnCFluidIngredient(net.neoforged.neoforge.fluids.crafting.FluidIngredient ingredient, int amount, String unit) Creates an instance of aBnCFluidIngredientrecord class.- Parameters:
ingredient- the value for theingredientrecord componentamount- the value for theamountrecord componentunit- the value for theunitrecord component
-
-
Method Details
-
asCreateIngredient
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
ingredient
public net.neoforged.neoforge.fluids.crafting.FluidIngredient ingredient()Returns the value of theingredientrecord component.- Returns:
- the value of the
ingredientrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
unit
Returns the value of theunitrecord component.- Returns:
- the value of the
unitrecord component
-