Class CreativeScreen.CreativeSlot

    • Field Detail

      • target

        private final Slot target
    • Constructor Detail

      • CreativeSlot

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

      • 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
      • isActive

        public boolean isActive()
        Overrides:
        isActive 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.