Class CreativeScreen.CreativeSlot

java.lang.Object
net.minecraft.inventory.container.Slot
net.minecraft.client.gui.screen.inventory.CreativeScreen.CreativeSlot
Enclosing class:
CreativeScreen

static class CreativeScreen.CreativeSlot extends Slot
  • Field Details

    • target

      private final Slot target
  • Constructor Details

    • CreativeSlot

      public CreativeSlot(Slot p_i229959_1_, int p_i229959_2_, int p_i229959_3_, int p_i229959_4_)
  • Method Details

    • onTake

      public ItemStack onTake(PlayerEntity p_190901_1_, ItemStack p_190901_2_)
      Overrides:
      onTake in class Slot
    • mayPlace

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

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

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

      public void set(ItemStack p_75215_1_)
      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_178170_1_)
      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_75209_1_)
      Overrides:
      remove in class Slot
    • isActive

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

      public boolean mayPickup(PlayerEntity p_82869_1_)
      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.