Class CreativeModeInventoryScreen.SlotWrapper

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

static class CreativeModeInventoryScreen.SlotWrapper extends Slot
  • Field Details

    • target

      final Slot target
  • Constructor Details

    • SlotWrapper

      public SlotWrapper(Slot p_98657_, int p_98658_, int p_98659_, int p_98660_)
  • Method Details

    • onTake

      public void onTake(Player p_169754_, ItemStack p_169755_)
      Overrides:
      onTake in class Slot
    • mayPlace

      public boolean mayPlace(ItemStack p_98670_)
      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 p_271008_, ItemStack p_299868_)
      Overrides:
      setByPlayer in class Slot
    • set

      public void set(ItemStack p_98679_)
      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 p_98675_)
      Overrides:
      getMaxStackSize in class Slot
    • getNoItemIcon

      @Nullable public com.mojang.datafixers.util.Pair<ResourceLocation,ResourceLocation> getNoItemIcon()
      Overrides:
      getNoItemIcon in class Slot
    • remove

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

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

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

      public int getSlotIndex()
      Description copied from class: Slot
      Retrieves 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
      Checks if the other slot is in the same inventory, by comparing the inventory reference.
      Overrides:
      isSameInventory in class Slot
      Returns:
      true if the other slot is in the same inventory
    • setBackground

      public Slot setBackground(ResourceLocation atlas, ResourceLocation sprite)
      Description copied from class: Slot
      Sets the background atlas and sprite location.
      Overrides:
      setBackground in class Slot
      Parameters:
      atlas - The atlas name
      sprite - The sprite located on that atlas.
      Returns:
      this, to allow chaining.