Record Class AmmunitionTableRecipeInput
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.crafting.input.AmmunitionTableRecipeInput
- All Implemented Interfaces:
net.minecraft.world.item.crafting.RecipeInput
public record AmmunitionTableRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items)
extends Record
implements net.minecraft.world.item.crafting.RecipeInput
-
Constructor Summary
ConstructorsConstructorDescriptionAmmunitionTableRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) Creates an instance of aAmmunitionTableRecipeInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.ItemStackgetItem(int index) final inthashCode()Returns a hash code value for this object.booleanisEmpty()net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items()Returns the value of theitemsrecord component.intsize()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AmmunitionTableRecipeInput
public AmmunitionTableRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) Creates an instance of aAmmunitionTableRecipeInputrecord class.- Parameters:
items- the value for theitemsrecord 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
-
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). -
items
public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items()Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-