Class SlotItemHandler

java.lang.Object
net.minecraft.world.inventory.Slot
net.neoforged.neoforge.items.SlotItemHandler

@Deprecated(since="1.21.9", forRemoval=true) public class SlotItemHandler extends Slot
Deprecated, for removal: This API element is subject to removal in a future version.
Use ResourceHandlerSlot instead.
  • Field Details

    • EMPTY_INVENTORY

      private static final Container EMPTY_INVENTORY
      Deprecated, for removal: This API element is subject to removal in a future version.
    • itemHandler

      private final IItemHandler itemHandler
      Deprecated, for removal: This API element is subject to removal in a future version.
    • index

      protected final int index
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • SlotItemHandler

      public SlotItemHandler(IItemHandler itemHandler, int index, int xPosition, int yPosition)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • mayPlace

      public boolean mayPlace(ItemStack stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      mayPlace in class Slot
    • getItem

      public ItemStack getItem()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getItem in class Slot
    • set

      public void set(ItemStack stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      set in class Slot
    • initialize

      public void initialize(ItemStack stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • onQuickCraft

      public void onQuickCraft(ItemStack oldStackIn, ItemStack newStackIn)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      onQuickCraft in class Slot
    • getMaxStackSize

      public int getMaxStackSize()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getMaxStackSize in class Slot
    • getMaxStackSize

      public int getMaxStackSize(ItemStack stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      getMaxStackSize in class Slot
    • mayPickup

      public boolean mayPickup(Player playerIn)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      mayPickup in class Slot
    • remove

      public ItemStack remove(int amount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      remove in class Slot
    • getItemHandler

      public IItemHandler getItemHandler()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isSameInventory

      public boolean isSameInventory(Slot other)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: Slot
      Checks if the other slot is in the same inventory, by comparing the inventory reference.
      Overrides:
      isSameInventory in class Slot
      Parameters:
      other -
      Returns:
      true if the other slot is in the same inventory