Slot.this

Creates a slot with an item and its highest value as count.

  1. this(Item item)
    struct Slot
    @safe @nogc
    this
  2. this(Item item, ubyte count)

Examples

assert(Slot(new Items.DiamondSword()).count == 1);
assert(Slot(new Items.Snowball()).count == 16);
assert(Slot(null).count == 0);

Meta