类 ItemHandlerCopySlot


public class ItemHandlerCopySlot extends StackCopySlot
Slot class that can be used with immutable IItemHandlers like ComponentItemHandler.
  • 字段详细资料

  • 构造器详细资料

    • ItemHandlerCopySlot

      public ItemHandlerCopySlot(IItemHandler itemHandler, int index, int xPosition, int yPosition)
    • ItemHandlerCopySlot

      public ItemHandlerCopySlot(SlotItemHandler slotItemHandler)
  • 方法详细资料

    • mayPlace

      public boolean mayPlace(ItemStack stack)
      覆盖:
      mayPlace 在类中 Slot
    • getStackCopy

      protected ItemStack getStackCopy()
      从类复制的说明: StackCopySlot
      Gets the itemstack from the storage.
      指定者:
      getStackCopy 在类中 StackCopySlot
      返回:
      the stack in this slot
    • setStackCopy

      protected void setStackCopy(ItemStack stack)
      从类复制的说明: StackCopySlot
      Sets the itemstack from the storage.
      指定者:
      setStackCopy 在类中 StackCopySlot
      参数:
      stack - the stack to put into this slot
    • onQuickCraft

      public void onQuickCraft(ItemStack oldStackIn, ItemStack newStackIn)
      覆盖:
      onQuickCraft 在类中 Slot
    • getMaxStackSize

      public int getMaxStackSize()
      覆盖:
      getMaxStackSize 在类中 Slot
    • getMaxStackSize

      public int getMaxStackSize(ItemStack stack)
      覆盖:
      getMaxStackSize 在类中 Slot
    • mayPickup

      public boolean mayPickup(Player playerIn)
      覆盖:
      mayPickup 在类中 Slot
    • isSameInventory

      public boolean isSameInventory(Slot other)
      从类复制的说明: Slot
      Checks if the other slot is in the same inventory, by comparing the inventory reference.
      覆盖:
      isSameInventory 在类中 Slot
      参数:
      other -
      返回:
      true if the other slot is in the same inventory
    • getItemHandler

      public IItemHandler getItemHandler()