{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "hd:resupply",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
                "scripts": {
        "animate": [
        ]
      },
      "animations": {
      }
    },
    "component_groups": {
        "drop":{
            "minecraft:interact": {
    "interactions": [
        {
            "on_interact": {
              "target": "self",
              "event": "take1"
            },
            "add_items": {
                "table": "loot_tables/gunpod/resupply.json"
            },
            "interact_text": "Take Ammo"
        }
    ]
},
      "minecraft:collision_box": {
        "height": 1.5,
        "width": 1
      },
      "minecraft:timer": {
        "looping": false,
        "time": 50.0,
        "time_down_event": {
          "event": "minecraft:death",
          "target": "self"
        }
      }
        },
        "take1":{
            "minecraft:mark_variant":{
                "value":1
            }, 
            "minecraft:interact": {
    "interactions": [
        {
            "on_interact": {
              "target": "self",
              "event": "take2"
            },
            "add_items": {
                "table": "loot_tables/gunpod/resupply.json"
            },
            "interact_text": "Take Ammo"
        }
    ]
}
        },
        "take2":{
            "minecraft:mark_variant":{
                "value":2
            }, 
            "minecraft:interact": {
    "interactions": [
        {
            "on_interact": {
              "target": "self",
              "event": "take3"
            },
            "add_items": {
                "table": "loot_tables/gunpod/resupply.json"
            },
            "interact_text": "Take Ammo"
        }
    ]
}
        },
        "take3":{
            "minecraft:mark_variant":{
                "value":3
            }, 
            "minecraft:interact": {
    "interactions": [
        {
            "on_interact": {
              "target": "self",
              "event": "take4"
            },
            "add_items": {
                "table": "loot_tables/gunpod/resupply.json"
            },
            "interact_text": "Take Ammo"
        }
    ]
}
        },
        "take4":{
            "minecraft:mark_variant":{
                "value":4
            }, 
      "minecraft:collision_box": {
        "height": 0.25,
        "width": 1
      },
      "minecraft:timer": {
        "looping": false,
        "time": 25.0,
        "time_down_event": {
          "event": "minecraft:death",
          "target": "self"
        }
      }
        }
    },
    "components": {
      "minecraft:type_family": {
        "family": [
          "stratagem"
        ]
      },
      "minecraft:breathable": {
        "totalSupply": 15,
        "suffocateTime": 0
      },
      "minecraft:collision_box": {
        "height": 0.25,
        "width": 0.25
      },
      "minecraft:fall_damage": {
        "value": 0.0
      },
           "minecraft:damage_sensor": {
                "triggers": {
                    "cause": "all",
                    "deals_damage": false
                }
            },
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": false
      },
      "minecraft:knockback_resistance": {
        "value": 1.0
      },
      "minecraft:movement": {
        "value": 0.0,
        "max": 0.0
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": false
      },
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {},
      "minecraft:health": {
        "value": 1
      },
      "minecraft:nameable": {
        "alwaysShow": false,
        "allowNameTagRenaming": false
      },
      "minecraft:fire_immune": true,
      "minecraft:physics": {},
      "minecraft:underwater_movement": {
        "value": 0.0
      },
      "minecraft:scale": {
        "value": 1
      },
      "minecraft:timer": {
        "looping": false,
        "time": 2.9,
        "time_down_event": {
          "event": "drop",
          "target": "self"
        }
      },
      "minecraft:on_death": {
        "event": "on:death",
        "target": "self"
      },
      "minecraft:on_hurt": {
        "event": "on:hurt",
        "target": "self"
      },
      "minecraft:on_hurt_by_player": {
        "event": "on:hurt_by_player",
        "target": "self"
      },
      "minecraft:on_ignite": {
        "event": "on:ignite",
        "target": "self"
      },
      "minecraft:on_target_acquired": {
        "event": "on:target_acquired",
        "target": "self"
      },
      "minecraft:on_target_escape": {
        "event": "on:target_escape",
        "target": "self"
      },
      "minecraft:on_wake_with_owner": {
        "event": "on:wake_with_owner",
        "target": "self"
      }
    },
    "events": {
    "drop": {
          "add": {
            "component_groups": [
              "drop"
              ]
          },
          "run_command":{
              "command":[
                  "particle helldrop ~~~",
                  "kill @e[r=1,family=!stratagem]",
                  "camerashake add @a[r=5] 1 0.3 rotational",
                  "camerashake add @a[r=10,rm=5] 0.5 0.3 rotational",
                  "playsound helldrop @a[r=15] ~~~"
                  ]
          }
        },
    "take1": {
          "add": {
            "component_groups": [
              "take1"
              ]
          }
        },
    "take2": {
          "run_command":{
              "command":[
                  "playsound take @a ~~~"
                  ]
          },
          "add": {
            "component_groups": [
              "take2"
              ]
          }
        },
    "take3": {
          "add": {
            "component_groups": [
              "take3"
              ]
          }
        },
    "take4": {
          "run_command":{
              "command":[
                  "playsound take2 @a ~~~"
                  ]
          },
          "remove": {
            "component_groups": [
              "drop",
              "take3"
              ]
          },
          "add": {
            "component_groups": [
              "take4"
              ]
          }
        },
    "minecraft:death": {
        "run_command": {
          "command": ["kill @s"]
        }
    },
      "on:death": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt_by_player": {
        "run_command": {
          "command": []
        }
      },
      "on:ignite": {
        "run_command": {
          "command": []
        }
      },
      "on:target_acquired": {
        "run_command": {
          "command": []
        }
      },
      "on:target_escape": {
        "run_command": {
          "command": []
        }
      },
      "on:wake_with_owner": {
        "run_command": {
          "command": []
        }
      }
    }
  }
}