getJson method

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

Implementation

@override
Map<String, dynamic> getJson() => looting_multiplier == null
    ? {
        'condition': 'minecraft:random_chance',
        'chance': chance,
      }
    : {
        'condition': 'minecraft:random_chance_with_looting',
        'chance': chance,
        'looting_multiplier': looting_multiplier,
      };