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

    Constructors
    Constructor
    Description
    ItemEntityRecipeInput(net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities)
    Creates an instance of a ItemEntityRecipeInput record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity>
    Returns the value of the entities record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
     
    net.minecraft.world.item.ItemStack
    getItem(int slot)
     
    final int
    Returns a hash code value for this object.
    boolean
     
    void
    Remove the item entity with the given index from the world.
    net.minecraft.world.item.ItemStack
    removeItem(int slot, int amount)
     
    net.minecraft.world.item.ItemStack
     
    void
    Deprecated.
    void
    setItem(int slot, net.minecraft.world.item.ItemStack stack)
     
    int
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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 a ItemEntityRecipeInput record class.
      Parameters:
      entities - the value for the entities record 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:
      size in interface net.minecraft.world.item.crafting.RecipeInput
    • getContainerSize

      public int getContainerSize()
      Specified by:
      getContainerSize in interface net.minecraft.world.Container
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.world.Container
      Specified by:
      isEmpty in interface net.minecraft.world.item.crafting.RecipeInput
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int slot)
      Specified by:
      getItem in interface net.minecraft.world.Container
      Specified by:
      getItem in interface net.minecraft.world.item.crafting.RecipeInput
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int slot, int amount)
      Specified by:
      removeItem in interface net.minecraft.world.Container
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot)
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
    • setItem

      public void setItem(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      setItem in interface net.minecraft.world.Container
    • setChanged

      @Deprecated public void setChanged()
      Deprecated.
      Specified by:
      setChanged in interface net.minecraft.world.Container
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entities

      public net.minecraft.core.NonNullList<net.minecraft.world.entity.item.ItemEntity> entities()
      Returns the value of the entities record component.
      Returns:
      the value of the entities record component