Item class
The Item class represents an item in an inventory in Minecraft. It is used in the Give or Nbt Commands.
Constructors
-
Item(dynamic type, {int? count, Slot? slot, int? damage, int? model, int? hideFlags, TextComponent? name, List<
TextComponent> ? lore, Map<String, dynamic> ? nbt}) - The Item class represents an item in an inventory in Minecraft. It is used in the Give or Nbt Commands.
-
Item.Book(List<
BookPage> pages, {String title = '', String author = '', int? count, Slot? slot, int? damage, int? model, int? hideFlags, TextComponent? name, List<TextComponent> ? lore, Map<String, dynamic> ? nbt}) -
Item.SpawnEgg(dynamic type, Summon entity, {int? count, Slot? slot, int? damage, int? model, int? hideFlags, TextComponent? name, List<
TextComponent> ? lore, Map<String, dynamic> ? nbt}) -
Item.type(String type, {int? count, Slot? slot, int? damage, Map<
String, dynamic> ? tag}) -
const
Properties
Methods
-
copyWith(
{String? type, int? count, int? damage, Slot? slot, int? model, int? hideFlags, TextComponent? name, List< TextComponent> ? lore, Map<String, dynamic> ? nbt}) → Item -
getGiveNotation(
{bool withDamage = true}) → String -
getId(
) → String -
getMap(
[bool useId = true]) → Map< String, dynamic> -
getNbt(
) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override