{
   "format_version": "1.16.100",
   "minecraft:block": {
      "description": {
         "identifier": "vatonage:setlootblock",
         "register_to_creative_menu": true
      },
      "components": {
         "minecraft:material_instances": {
            "*": {
               "texture": "common_lootcrate",
               "render_method": "alpha_test"
            }
         },
         "minecraft:pick_collision": {
             "origin":  [-8, 0, -8],
             "size":    [16, 8, 16]
         },
         "minecraft:entity_collision": {
             "origin":  [-8, 0, -8],
             "size":    [16, 8, 16]
         },
         "minecraft:destroy_time": 100,
         "minecraft:block_light_absorption": 0,
         "minecraft:ticking": {
            "looping": true,
            "range": [ 0.1, 0.1 ],
            "on_tick": {
               "event": "vatonage:generate",
               "target": "self"
            }
         }
      },
      "events": {
         "vatonage:generate": {
             "randomize": [
                 {
                     "weight":4,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ vatonage:common_lootcrate"
                                    ]
                     }
                 },
                 {
                     "weight":4,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ vatonage:uncommon_lootcrate"
                                    ]
                     }
                 },
                 {
                     "weight":3,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ vatonage:rare_lootcrate"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ vatonage:epic_lootcrate"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ vatonage:legendary_lootcrate"
                                    ]
                     }
                 },
                 {
                     "weight":4,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ air"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ lava"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ torch"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~-1 ~ netherrack",
                                    "setblock ~ ~ ~ fire"
                                    ]
                     }
                 },
                 {
                     "weight":3,
                     "run_command": {
                         "command": [
                                    "summon creeper"
                                    ]
                     }
                 },
                 {
                     "weight":4,
                     "run_command": {
                         "command": [
                                    "summon skeleton"
                                    ]
                     }
                 },
                 {
                     "weight":6,
                     "run_command": {
                         "command": [
                                    "summon zombie"
                                    ]
                     }
                 },
                 {
                     "weight":3,
                     "run_command": {
                         "command": [
                                    "summon enderman"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon wither_skeleton"
                                    ]
                     }
                 },
                 {
                     "weight":6,
                     "run_command": {
                         "command": [
                                    "summon spider"
                                    ]
                     }
                 },
                 {
                     "weight":4,
                     "run_command": {
                         "command": [
                                    "summon cave_spider"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon witch"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "summon vex"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon vindicator"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "summon evocation_illager"
                                    ]
                     }
                 },
                 {
                     "weight":3,
                     "run_command": {
                         "command": [
                                    "summon blaze"
                                    ]
                     }
                 },
                 {
                     "weight":3,
                     "run_command": {
                         "command": [
                                    "summon pillager"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon husk"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon stray"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon drowned"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "summon ravager"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "setblock ~ ~ ~ air",
                                    "summon shulker"
                                    ]
                     }
                 },
                 {
                     "weight":8,
                     "run_command": {
                         "command": [
                                    "summon silverfish"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon slime"
                                    ]
                     }
                 },
                 {
                     "weight":2,
                     "run_command": {
                         "command": [
                                    "summon guardian"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "summon rabbit"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "summon elder_guardian"
                                    ]
                     }
                 },
                 {
                     "weight":1,
                     "run_command": {
                         "command": [
                                    "summon magma_cube"
                                    ]
                     }
                 }
             ]
         }
      }
   }
}