{
    "name":"§dVoid Energy",
    "description":"§fYou charge your body with the essence of the Void. This Void Energy is then used for all of your abilities.",
    "type":"origins:multiple",
    "resource":{
       "type":"origins:resource",
       "min":0,
       "max":300,
       "hud_render":{
          "should_render":true,
          "sprite_location":"origins:textures/gui/community/spiderkolo/resource_bar_03.png",
          "bar_index":7
       },
       "start_value":0
    },
    "charge_on_kill":{
       "type":"origins:self_action_on_kill",
       "entity_action":{
          "type":"origins:change_resource",
          "resource":"voidwalker:void_energy_resource",
          "change":20,
          "operation": "add"
       },
       "cooldown":60,
       "hud_render":{
          "should_render":false
       }
    },
    "charge_on_blocks":{
        "type": "origins:action_over_time",
        "entity_action": {
            "type": "origins:and",
            "actions": [
                {
                    "type":"origins:change_resource",
                    "resource":"voidwalker:void_energy_resource",
                    "change":1,
                    "operation": "add"
                },
                {    
                    "type": "origins:spawn_particles",
                    "particle":"minecraft:portal",
                    "count": 5,
                    "speed": 1.00,
                    "force": false,
                    "spread": {
                        "x": 0.0,
                        "y": 0.0,
                        "z": 0.0
                    },
                    "offset_y": 1.0
                }
            ]
        },
        "interval":1,
        "condition": {
            "type": "origins:and",
            "conditions": [
                {      
                    "type": "origins:resource",
                    "resource": "voidwalker:void_energy_resource",
                    "comparison": "<",
                    "compare_to": 300
                },
                {
                    "type": "origins:on_block",
                    "block_condition": {
                        "type": "origins:or",
                        "conditions": [
                            {
                                "type": "origins:block",
                                "block": "minecraft:crying_obsidian"
                            },
                            {
                                "type": "origins:block",
                                "block": "minecraft:bedrock"
                            }
                        ]
                    }
                }
            ]
        }
    },
    "charged_particle":{
        "type": "origins:particle",
        "particle": "minecraft:portal",
        "count": 2,
        "speed": 0,
        "force": true,
        "spread": {
            "x": 0.25,
            "y": 0.25,
            "z": 0.26
        },
        "offset_y":0.5,
        "frequency": 1,
        "visible_in_first_person": false,
        "visible_while_invisible": true,
        "condition": {
            "type": "origins:and",
            "conditions": [
                {
                    "type": "origins:resource",
                    "resource": "voidwalker:void_energy_resource",
                    "comparison": ">",
                    "compare_to": 49
                },
                {      
                    "type":"origins:resource",
                    "resource":"voidwalker:chaotic_accelerant_toggle",
                    "comparison":"==",
                    "compare_to":0
                }
            ]
        }
    }
}