getNbt method

  1. @override
Map<String, dynamic> getNbt([
  1. bool useId = true
])
override

Implementation

@override
Map<String, dynamic> getNbt([bool useId = true]) {
  final nbt = super.getNbt(useId);

  void addIfExist(dynamic val, String tag) {
    if (val != null) nbt[tag] = val;
  }

  addIfExist(radius, 'Radius');
  addIfExist(applicationDelay, 'ReapplicationDelay');
  addIfExist(duration, 'Duration');
  addIfExist(waitTime, 'WaitTime');
  return nbt;
}