Record Class FluidStackInput
java.lang.Object
java.lang.Record
top.girlkisser.lazuli.api.crafting.FluidStackInput
- Record Components:
fluid- The fluid stack.
- All Implemented Interfaces:
net.minecraft.world.item.crafting.RecipeInput
public record FluidStackInput(net.neoforged.neoforge.fluids.FluidStack fluid)
extends Record
implements net.minecraft.world.item.crafting.RecipeInput
A recipe input for
FluidStacks.-
Constructor Summary
ConstructorsConstructorDescriptionFluidStackInput(net.neoforged.neoforge.fluids.FluidStack fluid) Creates an instance of aFluidStackInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.neoforged.neoforge.fluids.FluidStackfluid()Returns the value of thefluidrecord component.net.minecraft.world.item.ItemStackgetItem(int index) final inthashCode()Returns a hash code value for this object.booleanisEmpty()intsize()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FluidStackInput
public FluidStackInput(net.neoforged.neoforge.fluids.FluidStack fluid) Creates an instance of aFluidStackInputrecord class.- Parameters:
fluid- the value for thefluidrecord component
-
-
Method Details
-
getItem
public net.minecraft.world.item.ItemStack getItem(int index) - Specified by:
getItemin interfacenet.minecraft.world.item.crafting.RecipeInput
-
size
public int size()- Specified by:
sizein interfacenet.minecraft.world.item.crafting.RecipeInput
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.item.crafting.RecipeInput
-
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.neoforged.neoforge.fluids.FluidStack fluid()Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-