Record Class AstralCrystalRecipeInput
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.crafting.input.AstralCrystalRecipeInput
- All Implemented Interfaces:
net.minecraft.world.item.crafting.RecipeInput
public record AstralCrystalRecipeInput(net.minecraft.world.item.ItemStack material, net.minecraft.world.item.ItemStack catalyst)
extends Record
implements net.minecraft.world.item.crafting.RecipeInput
-
Constructor Summary
ConstructorsConstructorDescriptionAstralCrystalRecipeInput(net.minecraft.world.item.ItemStack material, net.minecraft.world.item.ItemStack catalyst) Creates an instance of aAstralCrystalRecipeInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackcatalyst()Returns the value of thecatalystrecord component.final 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.world.item.ItemStackmaterial()Returns the value of thematerialrecord component.intsize()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AstralCrystalRecipeInput
public AstralCrystalRecipeInput(net.minecraft.world.item.ItemStack material, net.minecraft.world.item.ItemStack catalyst) Creates an instance of aAstralCrystalRecipeInputrecord class.- Parameters:
material- the value for thematerialrecord componentcatalyst- the value for thecatalystrecord 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). -
material
public net.minecraft.world.item.ItemStack material()Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
catalyst
public net.minecraft.world.item.ItemStack catalyst()Returns the value of thecatalystrecord component.- Returns:
- the value of the
catalystrecord component
-