Record Class EntityRecipeInput
java.lang.Object
java.lang.Record
top.girlkisser.lazuli.api.crafting.EntityRecipeInput
- Record Components:
entity- The entity to... craft with.
- All Implemented Interfaces:
net.minecraft.world.item.crafting.RecipeInput
public record EntityRecipeInput(net.minecraft.world.entity.EntityType<?> entity)
extends Record
implements net.minecraft.world.item.crafting.RecipeInput
A recipe input for... entities. Strange, but I have used it before!
-
Constructor Summary
ConstructorsConstructorDescriptionEntityRecipeInput(net.minecraft.world.entity.EntityType<?> entity) Creates an instance of aEntityRecipeInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.EntityType<?> entity()Returns the value of theentityrecord 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()intsize()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EntityRecipeInput
public EntityRecipeInput(net.minecraft.world.entity.EntityType<?> entity) Creates an instance of aEntityRecipeInputrecord class.- Parameters:
entity- the value for theentityrecord component
-
-
Method Details
-
getItem
@Obsolete 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). -
entity
public net.minecraft.world.entity.EntityType<?> entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-