Record Class FluidIngredientWithAmount
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.recipes.FluidIngredientWithAmount
public record FluidIngredientWithAmount(net.neoforged.neoforge.fluids.crafting.FluidIngredient fluidIngredient, int amount)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidIngredientWithAmount> static final FluidIngredientWithAmountstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FluidIngredientWithAmount> -
Constructor Summary
ConstructorsConstructorDescriptionFluidIngredientWithAmount(net.neoforged.neoforge.fluids.crafting.FluidIngredient fluidIngredient, int amount) Creates an instance of aFluidIngredientWithAmountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.net.neoforged.neoforge.fluids.crafting.FluidIngredientReturns the value of thefluidIngredientrecord component.final inthashCode()Returns a hash code value for this object.static FluidIngredientWithAmountof(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey) static FluidIngredientWithAmountof(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey, int amount) static FluidIngredientWithAmountof(net.minecraft.world.level.material.Fluid fluid) static FluidIngredientWithAmountof(net.minecraft.world.level.material.Fluid fluid, int amount) static FluidIngredientWithAmountof(net.neoforged.neoforge.fluids.FluidStack fluidStack) booleantest(net.neoforged.neoforge.fluids.FluidStack fluidStack) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,FluidIngredientWithAmount> STREAM_CODEC
-
-
Constructor Details
-
FluidIngredientWithAmount
public FluidIngredientWithAmount(net.neoforged.neoforge.fluids.crafting.FluidIngredient fluidIngredient, int amount) Creates an instance of aFluidIngredientWithAmountrecord class.- Parameters:
fluidIngredient- the value for thefluidIngredientrecord componentamount- the value for theamountrecord component
-
-
Method Details
-
test
public boolean test(net.neoforged.neoforge.fluids.FluidStack fluidStack) -
of
-
of
public static FluidIngredientWithAmount of(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey) -
of
public static FluidIngredientWithAmount of(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey, int amount) -
of
-
of
public static FluidIngredientWithAmount of(net.minecraft.world.level.material.Fluid fluid, int amount) -
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 '=='. -
fluidIngredient
public net.neoforged.neoforge.fluids.crafting.FluidIngredient fluidIngredient()Returns the value of thefluidIngredientrecord component.- Returns:
- the value of the
fluidIngredientrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-