Record Class ItemEntityRecipeInput
java.lang.Object
java.lang.Record
top.girlkisser.lazuli.api.crafting.ItemEntityRecipeInput
- Record Components:
entities- The input item entities.
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.item.crafting.RecipeInput
public record ItemEntityRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities)
extends Record
implements net.minecraft.world.Container, net.minecraft.world.item.crafting.RecipeInput
A recipe input for a
net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity>.-
Field Summary
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionItemEntityRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities) Creates an instance of aItemEntityRecipeInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidnet.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.intnet.minecraft.world.item.ItemStackgetItem(int slot) final inthashCode()Returns a hash code value for this object.booleanisEmpty()voidremoveEntityFromWorld(int index) Remove the item entity with the given index from the world.net.minecraft.world.item.ItemStackremoveItem(int slot, int amount) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) voidDeprecated.voidsetItem(int slot, net.minecraft.world.item.ItemStack stack) intsize()booleanstillValid(net.minecraft.world.entity.player.Player player) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
-
Constructor Details
-
ItemEntityRecipeInput
public ItemEntityRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities) Creates an instance of aItemEntityRecipeInputrecord class.- Parameters:
entities- the value for theentitiesrecord component
-
-
Method Details
-
removeEntityFromWorld
public void removeEntityFromWorld(int index) Remove the item entity with the given index from the world.- Parameters:
index- The index.
-
size
public int size()- Specified by:
sizein interfacenet.minecraft.world.item.crafting.RecipeInput
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container- Specified by:
isEmptyin interfacenet.minecraft.world.item.crafting.RecipeInput
-
getItem
public net.minecraft.world.item.ItemStack getItem(int slot) - Specified by:
getItemin interfacenet.minecraft.world.Container- Specified by:
getItemin interfacenet.minecraft.world.item.crafting.RecipeInput
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int slot, int amount) - Specified by:
removeItemin interfacenet.minecraft.world.Container
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
setChanged
Deprecated.- Specified by:
setChangedin interfacenet.minecraft.world.Container
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-
clearContent
public void clearContent()- Specified by:
clearContentin interfacenet.minecraft.world.Clearable
-
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). -
entities
public net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities()Returns the value of theentitiesrecord component.- Returns:
- the value of the
entitiesrecord component
-