Class PlayerInventoryStack

  • All Implemented Interfaces:

    public class PlayerInventoryStack
    extends Renderable
    implements Tickable
    What's visible to the user in the player's inventory slots
    • Field Detail

      • tooltipWidth

        private int tooltipWidth
      • amountFont

        private static final org.newdawn.slick.Font amountFont
      • isBeingDragged

        public boolean isBeingDragged
      • didStartDrag

        public boolean didStartDrag
      • mouseHover

        public boolean mouseHover
      • setFontMetrics

        public boolean setFontMetrics
      • isShowingTooltip

        public boolean isShowingTooltip
      • MAX_AMOUNT

        public static int MAX_AMOUNT
    • Constructor Detail

      • PlayerInventoryStack

        public PlayerInventoryStack​(ItemStack itemStack,
                                    PlayerInventorySlot slot)
        Creates a new stack from the item stack and slot
        itemStack - The item stack to base this on
        slot - The slot where this stack will be
    • Method Detail

      • tick

        public void tick()
        Specified by:
        tick in interface Tickable
      • render

        public void render​(org.newdawn.slick.Graphics graphics)
        Specified by:
        render in class Renderable
      • onDragEnd

        private void onDragEnd()
      • drop

        private void drop()