Item.SpawnEgg constructor
Item.SpawnEgg(})
Implementation
Item.SpawnEgg(
dynamic type,
Summon entity, {
this.count,
this.slot,
this.damage,
int? model,
int? hideFlags,
TextComponent? name,
List<TextComponent>? lore,
Map<String, dynamic>? nbt,
}) : assert(
type is String || type is Item || type is Block,
'Please provide either a String, Item or Block',
),
tag = {},
type = type.toString() {
nbt ??= {};
nbt.addAll({
'EntityTag': {
'id': entity.type.type,
...entity.nbt ?? {},
}
});
_checkTags(model, type, hideFlags, name, lore, nbt);
}