Package com.prineside.tdi2
Class ItemStack
java.lang.Object
com.prineside.tdi2.ItemStack
- All Implemented Interfaces:
KryoSerializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
byte
static final int
static final Comparator<ItemStack>
static final Comparator<ItemStack>
static final Comparator<ItemStack>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int count) cpy()
static ItemStack
static ItemStack
fromJsonOrNull
(JsonValue jsonValue) int
getCount()
byte
getFlags()
getItem()
boolean
boolean
boolean
boolean
void
markDoubled
(boolean doubled) void
markFromDailyLoot
(boolean fromDaily) void
markFromRandomEncounter
(boolean fromEncounter) void
void
setCount
(int count) void
setCovered
(boolean covered) void
setItemAndCount
(Item item, int count) void
toString()
void
-
Field Details
-
MAX_COUNT
public static final int MAX_COUNT- See Also:
-
FLAG_COVERED
public static final byte FLAG_COVERED- See Also:
-
FLAG_DOUBLED
public static final byte FLAG_DOUBLED- See Also:
-
FLAG_DAILY_LOOT
public static final byte FLAG_DAILY_LOOT- See Also:
-
FLAG_RANDOM_ENCOUNTER
public static final byte FLAG_RANDOM_ENCOUNTER- See Also:
-
flags
public byte flags -
SORT_COMPARATOR_KIND
-
SORT_COMPARATOR_RARITY_ASC
-
SORT_COMPARATOR_RARITY_DESC
-
-
Constructor Details
-
ItemStack
-
ItemStack
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
-
read
- Specified by:
read
in interfaceKryoSerializable
-
getFlags
public byte getFlags() -
isCovered
public boolean isCovered() -
setCovered
public void setCovered(boolean covered) -
isDoubled
public boolean isDoubled() -
markDoubled
public void markDoubled(boolean doubled) -
isFromDailyLoot
public boolean isFromDailyLoot() -
markFromDailyLoot
public void markFromDailyLoot(boolean fromDaily) -
isFromRandomEncounter
public boolean isFromRandomEncounter() -
markFromRandomEncounter
public void markFromRandomEncounter(boolean fromEncounter) -
getCount
public int getCount() -
setCount
public void setCount(int count) -
add
public void add(int count) -
setItem
-
setItemAndCount
-
getItem
-
cpy
-
toJson
-
toString
-
fromJsonOrNull
-
fromJson
-