Item.Book constructor
Item.Book(})
Implementation
Item.Book(
List<BookPage> pages, {
String title = '',
String author = '',
this.count,
this.slot,
this.damage,
int? model,
int? hideFlags,
TextComponent? name,
List<TextComponent>? lore,
Map<String, dynamic>? nbt,
}) : type = Items.written_book.toString(),
tag = {} {
nbt ??= {};
nbt['title'] = title;
nbt['author'] = author;
nbt['pages'] = pages
.map((page) =>
json.encode(page.list.map((item) => item.toMap()).toList()))
.toList();
_checkTags(model, type, hideFlags, name, lore, nbt);
}