Class PlayerInventoryStack
- java.lang.Object
-
- net.egartley.beyondorigins.core.abstracts.Renderable
-
- net.egartley.beyondorigins.ingame.PlayerInventoryStack
-
- All Implemented Interfaces:
Tickable
public class PlayerInventoryStack extends Renderable implements Tickable
What's visible to the user in the player's inventory slots
-
-
Field Summary
Fields Modifier and Type Field Description private static org.newdawn.slick.Font
amountFont
boolean
didStartDrag
boolean
isBeingDragged
boolean
isShowingTooltip
ItemStack
itemStack
static int
MAX_AMOUNT
boolean
mouseHover
boolean
setFontMetrics
PlayerInventorySlot
slot
private int
tooltipWidth
-
Constructor Summary
Constructors Constructor Description PlayerInventoryStack(ItemStack itemStack, PlayerInventorySlot slot)
Creates a new stack from the item stack and slot
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
drop()
private void
onDragEnd()
void
render(org.newdawn.slick.Graphics graphics)
void
tick()
-
Methods inherited from class net.egartley.beyondorigins.core.abstracts.Renderable
setPosition, x, x, y, y
-
-
-
-
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
-
itemStack
public ItemStack itemStack
-
slot
public PlayerInventorySlot slot
-
-
Constructor Detail
-
PlayerInventoryStack
public PlayerInventoryStack(ItemStack itemStack, PlayerInventorySlot slot)
Creates a new stack from the item stack and slot- Parameters:
itemStack
- The item stack to base this onslot
- The slot where this stack will be
-
-
Method Detail
-
render
public void render(org.newdawn.slick.Graphics graphics)
- Specified by:
render
in classRenderable
-
onDragEnd
private void onDragEnd()
-
drop
private void drop()
-
-