Package games.stendhal.client.entity
Class StackableItem
java.lang.Object
games.stendhal.client.entity.Entity
games.stendhal.client.entity.Item
games.stendhal.client.entity.StackableItem
- All Implemented Interfaces:
IEntity
,RPObjectChangeListener
- Direct Known Subclasses:
UseableItem
This is a stackable item.
-
Field Summary
Modifier and TypeFieldDescriptionstatic games.stendhal.client.entity.Property
Quantity property.Fields inherited from class games.stendhal.client.entity.Entity
clazz, inAdd, name, rpObject, title, type, x, y
Fields inherited from interface games.stendhal.client.entity.IEntity
PROP_ANIMATED, PROP_CLASS, PROP_NAME, PROP_POSITION, PROP_SIZE, PROP_STATE, PROP_TITLE, PROP_VISIBILITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the item quantity.void
onChangedAdded(RPObject object, RPObject changes)
The object added/changed attribute(s).Methods inherited from class games.stendhal.client.entity.Item
getContent, initialize
Methods inherited from class games.stendhal.client.entity.Entity
addChangeListener, addContentChangeListener, fireChange, getArea, getCursor, getEntityClass, getEntitySubclass, getHeight, getID, getName, getObjectID, getPath, getResistance, getResistance, getRPObject, getSlot, getTitle, getType, getVisibility, getWidth, getX, getY, isObstacle, isOnGround, isUser, onAdded, onChangedRemoved, onPosition, onRemoved, onSlotAdded, onSlotChangedAdded, onSlotChangedRemoved, onSlotRemoved, processPositioning, release, removeChangeListener, removeContentChangeListener, toString, update
-
Field Details
-
PROP_QUANTITY
public static final games.stendhal.client.entity.Property PROP_QUANTITYQuantity property.
-
-
Constructor Details
-
StackableItem
public StackableItem()Create a stackable item.
-
-
Method Details
-
getQuantity
public int getQuantity()Get the item quantity.- Returns:
- The number of items.
-
onChangedAdded
The object added/changed attribute(s).- Specified by:
onChangedAdded
in interfaceRPObjectChangeListener
- Overrides:
onChangedAdded
in classEntity
- Parameters:
object
- The base object.changes
- The changes.
-