{
   "name":"§dChaotic Accelerant",
   "description":"§fYou gain strength when overcharged with void energy. This Overcharge makes you a glass cannon and multiplies all damage dealt and received.§r §e[Load Toolbar Activator]",
   "type":"origins:multiple",
   "resource":{
      "type":"origins:resource",
      "min":0,
      "max":1,
      "hud_render":{
         "should_render":false
      },
      "start_value":0
   },
   "toggle":{
      "type":"origins:resource",
      "min":0,
      "max":1,
      "hud_render":{
         "should_render":false
      },
      "start_value":0
   },
   "consume_end_crystal":{
      "type":"origins:edible_item",
      "entity_action":{
         "type":"origins:change_resource",
         "resource":"voidwalker:chaotic_accelerant_resource",
         "change":1,
         "operation":"set"
      },
      "item_action":{
         "type":"origins:consume",
         "amount":1
      },
      "item_condition":{
         "type":"origins:ingredient",
         "ingredient":{
            "item":"minecraft:end_crystal"
         }
      },
      "food_component":{
         "hunger":0,
         "saturation":0.0,
         "meat":false,
         "always_edible":true,
         "snack":false
      },
      "consume_animation":"eat",
      "consume_sound":"minecraft:entity.generic.eat",
      "priority":1,
      "condition":{
         "type":"origins:and",
         "conditions":[
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_resource",
               "comparison":"==",
               "compare_to":0
            },
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_toggle",
               "comparison":"==",
               "compare_to":0
            }
         ]
      }
   },
   "feedback":{
      "type":"origins:action_over_time",
      "entity_action":{
         "type":"origins:execute_command",
         "command":"title @s actionbar [{\"text\":\"-<\",\"color\":\"dark_purple\"},{\"text\":\"Void Overcharge Available\",\"color\":\"light_purple\"},{\"text\":\">-\",\"color\":\"dark_purple\"}]"
      },
      "interval":3,
      "condition":{
         "type":"origins:and",
         "conditions":[
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_resource",
               "comparison":"==",
               "compare_to":1
            },
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_toggle",
               "comparison":"==",
               "compare_to":0
            },
            {
               "type":"origins:resource",
               "resource":"voidwalker:void_energy_resource",
               "comparison":"==",
               "compare_to":300
            }
         ]
      }
   },
   "active":{
      "type":"origins:active_self",
      "entity_action":{
         "type":"origins:and",
         "actions":[
            {
               "type":"origins:play_sound",
               "sound":"minecraft:entity.enderman.teleport",
               "volume":1.00,
               "pitch":0.50
            },
            {
               "type":"origins:change_resource",
               "resource":"voidwalker:void_energy_resource",
               "change":0,
               "operation":"set"
            },
            {
               "type":"origins:change_resource",
               "resource":"voidwalker:chaotic_accelerant_toggle",
               "change":1,
               "operation":"set"
            },
            {
               "type":"origins:delay",
               "action":{
                  "type":"origins:and",
                  "actions":[
                     {
                        "type":"origins:change_resource",
                        "resource":"voidwalker:chaotic_accelerant_resource",
                        "change":0,
                        "operation":"set"
                     },
                     {
                        "type":"origins:change_resource",
                        "resource":"voidwalker:chaotic_accelerant_toggle",
                        "change":0,
                        "operation":"set"
                     }
                  ]
               },
               "ticks":3600
            }
         ]
      },
      "cooldown":1,
      "hud_render":{
         "should_render":false
      },
      "key":{
         "key":"key.loadToolbarActivator",
         "continuous":false
      },
      "condition":{
         "type":"origins:and",
         "conditions":[
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_resource",
               "comparison":"==",
               "compare_to":1
            },
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_toggle",
               "comparison":"==",
               "compare_to":0
            },
            {
               "type":"origins:resource",
               "resource":"voidwalker:void_energy_resource",
               "comparison":"==",
               "compare_to":300
            }
         ]
      }
   },
   "shader":{
      "type":"origins:shader",
      "shader":"minecraft:shaders/post/invert.json",
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "glass_cannon_enhanced_attribute":{
      "type":"origins:conditioned_attribute",
      "modifiers":[
         {
            "attribute":"minecraft:generic.attack_damage",
            "operation":"multiply_base",
            "value":3.00,
            "name":"Increased Base Damage"
         },
         {
            "attribute":"minecraft:generic.movement_speed",
            "operation":"multiply_base",
            "value":3.00,
            "name":"Increased Base Speed"
         }
      ],
      "tick_rate":1,
      "update_health":false,
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "glass_cannon_ranged_damage_increase":{
      "type":"origins:modify_projectile_damage",
      "modifier":{
         "operation":"multiply_total",
         "value":2.00
      },
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "glass_cannon_increase_damage_taken":{
      "type":"origins:modify_damage_taken",
      "modifier":{
         "operation":"multiply_total",
         "value":3.00
      },
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "active_particles":{
      "type":"origins:particle",
      "particle":"minecraft:reverse_portal",
      "count":5,
      "speed":0.25,
      "force":true,
      "spread":{
         "x":0.375,
         "y":0.375,
         "z":0.375
      },
      "offset_y":1.00,
      "frequency":3,
      "visible_in_first_person":false,
      "visible_while_invisible":true,
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "sound_to_players":{
      "type":"origins:action_over_time",
      "entity_action":{
         "type":"origins:play_sound",
         "sound":"minecraft:entity.enderman.stare",
         "volume":1.00,
         "pitch":0.50
      },
      "interval":200,
      "condition":{
         "type":"origins:and",
         "conditions":[
            {
               "type":"origins:command",
               "command":"execute if entity @a[distance=1..10]",
               "comparison":"==",
               "compare_to":1
            },
            {
               "type":"origins:resource",
               "resource":"voidwalker:chaotic_accelerant_toggle",
               "comparison":"==",
               "compare_to":1
            }
         ]
      }
   },
   "charge_on_kill":{
      "type":"origins:self_action_on_kill",
      "entity_action":{
         "type":"origins:change_resource",
         "resource":"voidwalker:void_energy_resource",
         "change":50,
         "operation":"add"
      },
      "cooldown":60,
      "hud_render":{
         "should_render":false
      },
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "self_glow":{
      "type":"origins:self_glow",
      "entity_condition":{
         "type":"origins:living"
      },
      "bientity_condition":{
         "type":"origins:and",
         "conditions":[
            {
               "type":"origins:can_see",
               "shape_type":"visual",
               "fluid_handling":"none"
            },
            {
               "type":"origins:distance",
               "comparison":"<=",
               "compare_to":30
            }
         ]
      },
      "use_teams":false,
      "red":170.00,
      "green":0.00,
      "blue":170.00,
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   },
   "reset_on_death":{
      "type":"origins:action_on_death",
      "bientity_action":{
         "type":"origins:target_action",
         "action":{
            "type":"origins:and",
            "actions":[
               {
                  "type":"origins:change_resource",
                  "resource":"voidwalker:chaotic_accelerant_resource",
                  "change":0,
                  "operation":"set"
               },
               {
                  "type":"origins:change_resource",
                  "resource":"voidwalker:chaotic_accelerant_toggle",
                  "change":0,
                  "operation":"set"
               },
               {
                  "type":"origins:explode",
                  "power":4,
                  "destruction_type":"break",
                  "damage_self":false,
                  "create_fire":false
               }
            ]
         }
      },
      "condition":{
         "type":"origins:resource",
         "resource":"voidwalker:chaotic_accelerant_toggle",
         "comparison":"==",
         "compare_to":1
      }
   }
}