Data class

Inheritance

Constructors

Data(dynamic target, {Map<String, dynamic>? nbt = const {}, String type = 'merge'})
The Data Widgets allows you to edit nbt data of Entities or Blocks.
Data.copy(dynamic target, {required String path, required dynamic from, required String fromPath})
A handy shortcut to copy data quickly is the Data.copy constructor, which just copies a property from one path to another.
Data.fromScore(dynamic target, {required String path, required Score? score, num? scale = 1, String? datatype = 'byte'})
You can also convert a score directly to a nbt field with Data.fromScore:
Data.get(dynamic target, {required String path, num? scale})
Data.merge(dynamic target, {Map<String, dynamic>? nbt = const {}, String? strNbt})
Data.modify(dynamic target, {required String path, required DataModify? modify})
The modify operation is also available, yet a bit more complex.
Data.remove(dynamic target, {required String path})

Properties

called bool
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
datatype String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isGetting bool
no setter
modify DataModify?
getter/setter pair
nbt Map<String, dynamic>?
getter/setter pair
path String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale num?
getter/setter pair
score Score?
getter/setter pair
strNbt String?
getter/setter pair
subcommand String
no setter
target ↔ dynamic
getter/setter pair
type String
no setter
typeValue String
no setter
writable List<Widget>?
The writable list the RestAction writes it's contents on
getter/setter pairinherited

Methods

generate(Context context) Widget
override
getTarget([Context? c]) String
handleTarget(dynamic target) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queue([List<Widget>? writable]) → void
Execute this method to add this to the WidgetList (can use default list or as parameter given list) This method can only be executed once, if it is executed multiple times you will get an Error. You can read out if it is already executed in the boolean Called Example for a queue method:
inherited
toMap() → dynamic
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited