Class RecipeWrapper

java.lang.Object
net.neoforged.neoforge.items.wrapper.RecipeWrapper
All Implemented Interfaces:
Clearable, Container

public class RecipeWrapper extends Object implements Container
  • Field Details

  • Constructor Details

  • Method Details

    • getContainerSize

      public int getContainerSize()
      Returns the size of this inventory.
      Specified by:
      getContainerSize in interface Container
    • getItem

      public ItemStack getItem(int slot)
      Returns the stack in this slot. This stack should be a modifiable reference, not a copy of a stack in your inventory.
      Specified by:
      getItem in interface Container
    • removeItem

      public ItemStack removeItem(int slot, int count)
      Attempts to remove n items from the specified slot. Returns the split stack that was removed. Modifies the inventory.
      Specified by:
      removeItem in interface Container
    • setItem

      public void setItem(int slot, ItemStack stack)
      Sets the contents of this slot to the provided stack.
      Specified by:
      setItem in interface Container
    • removeItemNoUpdate

      public ItemStack removeItemNoUpdate(int index)
      Removes the stack contained in this slot from the underlying handler, and returns it.
      Specified by:
      removeItemNoUpdate in interface Container
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Container
    • canPlaceItem

      public boolean canPlaceItem(int slot, ItemStack stack)
      Specified by:
      canPlaceItem in interface Container
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface Clearable
    • getMaxStackSize

      public int getMaxStackSize()
      Specified by:
      getMaxStackSize in interface Container
    • setChanged

      public void setChanged()
      Specified by:
      setChanged in interface Container
    • stillValid

      public boolean stillValid(Player player)
      Specified by:
      stillValid in interface Container
    • startOpen

      public void startOpen(Player player)
      Specified by:
      startOpen in interface Container
    • stopOpen

      public void stopOpen(Player player)
      Specified by:
      stopOpen in interface Container