{
   "format_version":"1.16.100",
   "minecraft:block":{
      "description":{
         "identifier":"vatonage:sacrificial_table",
         "register_to_creative_menu":true,
         "properties":{
            "vatonage:store":[
               0,
               1,
               2,
               3,
               4,
               5,
               6
            ]
         }
      },
      "components":{
         "minecraft:material_instances":{
            "*":{
               "texture":"sacrificial_table",
               "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:geometry":"geometry.sacrificial_table",
         "minecraft:destroy_time":1,
         "minecraft:block_light_absorption":0
      },
      "events":{
         "vatonage:take0":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'sacrificial_knife' || query.get_equipped_item_name == 'demonic_knife'",
                  "set_block_property":{
                     "vatonage:store":1
                  },
                  "run_command": {
                     "command": "damage @p 2 entity_attack entity @p"
                  }
               }
            ]
         },
         "vatonage:take1":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'glass_bottle'",
                  "set_block_property":{
                     "vatonage:store":0
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bottle"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'sacrificial_knife' || query.get_equipped_item_name == 'demonic_knife'",
                  "set_block_property":{
                     "vatonage:store":2
                  },
                  "run_command": {
                     "command": "damage @p 2 entity_attack entity @p"
                  }
               }
            ]
         },
         "vatonage:take2":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'glass_bottle'",
                  "set_block_property":{
                     "vatonage:store":1
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bottle"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'sacrificial_knife' || query.get_equipped_item_name == 'demonic_knife'",
                  "set_block_property":{
                     "vatonage:store":3
                  },
                  "run_command": {
                     "command": "damage @p 2 entity_attack entity @p"
                  }
               }
            ]
         },
         "vatonage:take3":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'glass_bottle'",
                  "set_block_property":{
                     "vatonage:store":2
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bottle"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'bucket'",
                  "set_block_property":{
                     "vatonage:store":0
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bucket"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'sacrificial_knife' || query.get_equipped_item_name == 'demonic_knife'",
                  "set_block_property":{
                     "vatonage:store":4
                  },
                  "run_command": {
                     "command": "damage @p 2 entity_attack entity @p"
                  }
               }
            ]
         },
         "vatonage:take4":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'glass_bottle'",
                  "set_block_property":{
                     "vatonage:store":3
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bottle"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'bucket'",
                  "set_block_property":{
                     "vatonage:store":1
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bucket"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'sacrificial_knife' || query.get_equipped_item_name == 'demonic_knife'",
                  "set_block_property":{
                     "vatonage:store":5
                  },
                  "run_command": {
                     "command": "damage @p 2 entity_attack entity @p"
                  }
               }
            ]
         },
         "vatonage:take5":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'glass_bottle'",
                  "set_block_property":{
                     "vatonage:store":4
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bottle"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'bucket'",
                  "set_block_property":{
                     "vatonage:store":2
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bucket"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'sacrificial_knife' || query.get_equipped_item_name == 'demonic_knife'",
                  "set_block_property":{
                     "vatonage:store":6
                  },
                  "run_command": {
                     "command": "damage @p 2 entity_attack entity @p"
                  }
               }
            ]
         },
         "vatonage:take6":{
            "sequence":[
               {
                  "condition":"query.get_equipped_item_name == 'glass_bottle'",
                  "set_block_property":{
                     "vatonage:store":5
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bottle"
                  }
               },
               {
                  "condition":"query.get_equipped_item_name == 'bucket'",
                  "set_block_property":{
                     "vatonage:store":3
                  },
                  "decrement_stack":{
                  },
                  "run_command": {
                     "command": "give @p vatonage:blood_bucket"
                  }
               }
            ]
         }
      },
      "permutations":[
         {
            "condition":"query.block_property('vatonage:store') == 0",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take0"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table",
                     "render_method":"alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:store') == 1",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take1"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table1",
                     "render_method":"alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:store') == 2",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take2"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table2",
                     "render_method":"alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:store') == 3",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take3"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table3",
                     "render_method":"alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:store') == 4",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take4"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table4",
                     "render_method":"alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:store') == 5",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take5"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table5",
                     "render_method":"alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:store') == 6",
            "components":{
               "minecraft:on_interact":{
                  "target":"other",
                  "event":"vatonage:take6"
               },
               "minecraft:material_instances":{
                  "*":{
                     "texture":"sacrificial_table6",
                     "render_method":"alpha_test"
                  }
               }
            }
         }
      ]
   }
}