Item.max

Indicates the highest number of items that can be stacked in a slot. This number is the default slot's count if not specified when created.

class Item
pure nothrow @property @safe @nogc
ubyte
max
()

Return Value

Type: ubyte

a number between 1 and 64 (usually 1, 16 or 64).

Examples

Slot slot = new Items.Beetroot();
assert(slot.count == 64 && slot.item.max == 64);
assert(slot.item.max == 64);

slot = new Slot(new Items.Beetroot(), 23);
assert(slot.count != 64 && slot.count == 23);

Meta