getJson method

  1. @override
Map<String, dynamic> getJson()
override

Implementation

@override
Map<String, dynamic> getJson() {
  var ret = <String, dynamic>{
    'condition': 'minecraft:block_state_property',
  };

  if (properties != null && properties!.isNotEmpty) {
    ret['properties'] = properties!
        .map<String, String>((key, val) => MapEntry(key, gson.encode(val)));
  }
  return ret;
}