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(height, 'height');
  addIfExist(width, 'width');
  addIfExist(response, 'response');
  return nbt;
}