Class RecipeWrapper

java.lang.Object
net.minecraftforge.items.wrapper.RecipeWrapper
All Implemented Interfaces:
IClearable, IInventory

public class RecipeWrapper extends Object implements IInventory
  • Field Details

  • Constructor Details

  • Method Details

    • getContainerSize

      public int getContainerSize()
      Returns the size of this inventory. Must be equivalent to #getHeight() * #getWidth().
      Specified by:
      getContainerSize in interface IInventory
    • 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 IInventory
    • 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 IInventory
    • setItem

      public void setItem(int slot, ItemStack stack)
      Sets the contents of this slot to the provided stack.
      Specified by:
      setItem in interface IInventory
    • 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 IInventory
    • isEmpty

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

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

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

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

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

      public boolean stillValid(PlayerEntity player)
      Specified by:
      stillValid in interface IInventory
    • startOpen

      public void startOpen(PlayerEntity player)
      Specified by:
      startOpen in interface IInventory
    • stopOpen

      public void stopOpen(PlayerEntity player)
      Specified by:
      stopOpen in interface IInventory