{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:tnt_minecart",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },

    "component_groups": {
      "minecraft:primed_tnt": {
        "minecraft:explode": {
          "fuse_length": 4,
          "fuse_lit": true,
          "power": 3,
          "causes_fire": false
        },
        "minecraft:rail_sensor": {
          
        
        },
        "minecraft:is_ignited": {
        }
      },
      "minecraft:instant_explode_tnt": {
        "minecraft:explode": {
          "fuse_length": 0,
          "fuse_lit": true,
          "power": 3,
          "causes_fire": false
        },
        "minecraft:rail_sensor": {
          
        
        },
        "minecraft:is_ignited": {
        }
      },
      "minecraft:inactive": {
        "minecraft:rail_sensor": {
          "on_activate": {

            "filters": {
              "all_of": [
                {
                  "test": "is_game_rule",
                  "domain": "tntexplodes",
                  "operator": "==",
                  "value": true
                }
              ]
            },
            "event": "minecraft:on_prime"
          }
          
        },
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "any_of": [
                    {"test": "has_equipment", "subject": "other", "domain": "hand", "value": "fireball:0"},
                    {
                      "test": "has_equipment",
                      "subject": "other",
                      "domain": "hand",
                      "value": "flint_and_steel"
                    }
                  ],
                  "all_of": [
                    {"test": "is_family", "subject": "other", "value": "player"},
                    {"test": "is_game_rule", "domain": "tntexplodes", "operator": "==", "value": true}
                  ]
                },
                "event": "minecraft:on_prime",
                "target": "self"
              },
              "swing": true,
              "play_sounds": "ignite",
              "interact_text": "action.interact.creeper"
            },
            {
              "on_interact": {
                "filters": {
                  "any_of": [
                    {
                      "test": "has_component",
                      "subject": "other",
                      "value": "fire_aspect"
                    }
                  ],
                  "all_of": [
                    {
                      "test": "is_game_rule",
                      "domain": "tntexplodes",
                      "operator": "==",
                      "value": true
                    }
                  ]
                },
                "event": "minecraft:on_prime",
                "target": "self"
              },
              "swing": true,
              "interact_text": "action.interact.creeper"
            }
          ]
        }
      }
    },

    "components": {
      "minecraft:type_family": {
        "family": [ "minecart", "inanimate" ]
      },
      "minecraft:collision_box": {
        "width": 0.98,
        "height": 0.7
      },
      "minecraft:rail_movement": {
      },
      "minecraft:is_stackable": {
      },
      "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:inactive"
          ]
        }
      },
      "minecraft:on_prime": {
        "remove": {
          "component_groups": [
            "minecraft:inactive"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:primed_tnt"
          ]
        }
      },
      "minecraft:on_instant_prime": {
        "remove": {
          "component_groups": [
            "minecraft:inactive"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:instant_explode_tnt"
          ]
        }
      }
    }

  }
}
