{
	"name": {
		"text": "Keystone of Bezel"
	},
	
	"creative_tab": "charms",
	
	"armor_material": {
		"durability": 0,
		"damage_reduction_amounts": [0, 6, 1, 0],
		"enchantibility": 15,
		"toughness": 0.0,
		"sound": "item.armor.equip_leather"
	},
    "effects": [
		],
			"abilities": {
		"key charm": {
			"ability": "lucraftcore:toggle_power",
              		"title": {"text":"Enable Charm"},
			"show_in_bar": true,	
			"bar_color": "red",
			"icon": {
			"type": "texture",
			"texture": "charmsofbezel:textures/gui/keystone_of_bezel.png"}
		  	},
		"keystone_strenght": {
			"ability": "lucraftcore:strength",
			"hidden": true,
			"amount": 10.0,
			"show_in_bar": false,	
			"required_ability": "key charm",
			"bar_color": "blue",
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "min_mana"}]
		  	},
		"keystone_speed": {
			"ability": "lucraftcore:sprint",
			"hidden": true,
			"required_ability": "key charm",
			"amount": 3.0,
			"show_in_bar": false,	
			"bar_color": "blue",
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "min_mana"}]
		  	},
		"fall resis key": {
			"ability": "lucraftcore:fall_resistance",
			"show_in_bar": false,
			"required_ability": "key charm",	
			"amount": 15.0,
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "min_mana"}]
		  	},
		"res": {
			"ability": "lucraftcore:resistance",
			"show_in_bar": false,
			"required_ability": "key charm",	
			"amount": 8.0,
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "min_mana"}]
		  	},
		"keystone_jump": {
			"ability": "lucraftcore:jump_boost",
			"required_ability": "key charm",
			"amount": 1.2,
			"show_in_bar": false,	
			"bar_color": "blue",
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "min_mana"}]
		  	},
	"mana system keystone": {
		"ability": "lucraftcore:command_loop",	
			"show_in_bar": false,	
			"icon": { "type": "internal" },		
			"commands": [
		"scoreboard players tag @s add mana_upgrade",
		"scoreboard players set @s[tag=mana_upgrade_min=2]",
		"scoreboard players set @s mana_display 1",
		"/effect @s minecraft:jump_boost 1 1 true",
		"/gamerule commandBlockOutput false",
		"scoreboard players tag @s remove min_mana",
		"/scoreboard players set @s[tag=!mana_upgrade] mana_display 0",
		"scoreboard players tag @s[score_mana_min=3] add min_mana",
		"/scoreboard objectives add mana dummy", 
		"/scoreboard objectives add mana_recharge dummy", 
		"/scoreboard players add @s mana_recharge 1", 
		"/scoreboard players add @s[score_mana_recharge_min=100] mana 6", 
		"/scoreboard players set @s[score_mana_recharge_min=100] mana_recharge 1", 		
		"/scoreboard players set @s[score_mana_min=601] mana 600",

		"/execute @s[score_mana_min=0,score_mana=0,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=1,score_mana=60,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=61,score_mana=120,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=121,score_mana=180,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=181,score_mana=240,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=241,score_mana=300,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=301,score_mana=360,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=361,score_mana=420,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=421,score_mana=480,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=481,score_mana=540,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"▋▋\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
		"/execute @s[score_mana_min=541,score_mana=600,score_mana_display_min=1,score_mana_display=2] ~ ~ ~ title @s actionbar [{\"text\":\"\",\"color\":\"dark_gray\"},{\"text\":\"▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋▋\",\"color\":\"red\"},{\"text\":\"\",\"color\":\"gray\"},{\"text\":\"\",\"color\":\"dark_gray\"}]",
			"effect @s jump_boost 1 1 true"]
			},
	"remove tag": {
		"ability": "lucraftcore:command_loop",	
			"show_in_bar": false,		
			"commands": [
			"scoreboard players tag @s remove mana_upgrade",
			"scoreboard players remove @s[score_mana_display_min=1] mana_display 1"]
			}
		},
	"armor_parts": {
		"chest": {
			"openable": false,
			"glow": false,
			"armor_model_scale": 0.25,
			"name": {
				"text": "Keystone of Bezel"
			},
			"textures": {
				"normal": "charmsofbezel:textures/models/keystone_of_bezel.png"
			},
			"item_texture": {
				"blockstate": "charmsofbezel:keystone_of_bezel"
			}
		}
	}
}
