Class CreativeModeInventoryScreen.SlotWrapper

java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen.SlotWrapper
Enclosing class:
CreativeModeInventoryScreen

private static class CreativeModeInventoryScreen.SlotWrapper extends Slot
  • Field Details

    • target

      private final Slot target
  • Constructor Details

    • SlotWrapper

      public SlotWrapper(Slot target, int index, int x, int y)
  • Method Details

    • onTake

      public void onTake(Player player, ItemStack carried)
      Overrides:
      onTake in class Slot
    • mayPlace

      public boolean mayPlace(ItemStack itemStack)
      Overrides:
      mayPlace in class Slot
    • getItem

      public ItemStack getItem()
      Overrides:
      getItem in class Slot
    • hasItem

      public boolean hasItem()
      Overrides:
      hasItem in class Slot
    • setByPlayer

      public void setByPlayer(ItemStack itemStack, ItemStack previous)
      Overrides:
      setByPlayer in class Slot
    • set

      public void set(ItemStack itemStack)
      Overrides:
      set in class Slot
    • setChanged

      public void setChanged()
      Overrides:
      setChanged in class Slot
    • getMaxStackSize

      public int getMaxStackSize()
      Overrides:
      getMaxStackSize in class Slot
    • getMaxStackSize

      public int getMaxStackSize(ItemStack itemStack)
      Overrides:
      getMaxStackSize in class Slot
    • getNoItemIcon

      public @Nullable Identifier getNoItemIcon()
      Overrides:
      getNoItemIcon in class Slot
    • remove

      public ItemStack remove(int amount)
      Overrides:
      remove in class Slot
    • isActive

      public boolean isActive()
      Overrides:
      isActive in class Slot
    • mayPickup

      public boolean mayPickup(Player player)
      Overrides:
      mayPickup in class Slot
    • getSlotIndex

      public int getSlotIndex()
      Description copied from class: Slot
      Neo: Returns the index in the inventory for this slot. This value should typically not be used, but can be useful for some occasions.
      Overrides:
      getSlotIndex in class Slot
      Returns:
      Index in associated inventory for this slot.
    • isSameInventory

      public boolean isSameInventory(Slot other)
      Description copied from class: Slot
      Neo: Returns whether this slot belongs to the same inventory as the given slot.
      Overrides:
      isSameInventory in class Slot
      Returns:
      whether this slot belongs to the same inventory as the given slot
    • setBackground

      public Slot setBackground(Identifier sprite)
      Description copied from class: Slot
      Neo: Set the background sprite location.
      Overrides:
      setBackground in class Slot
      Parameters:
      sprite - The sprite location
      Returns:
      this, to allow chaining.