{
	"format_version":"1.10",
	"animation_controllers":{
		"controller.animation.shade":{
		"initial_state":"off",
		"states":{
			"off":{
				"transitions":[{"on":"query.is_item_name_any('slot.weapon.mainhand', 0, 'minecraft:torch') && query.is_sneaking && !query.is_in_ui"}]
			},
			"on":{
				"on_entry": ["variable.time_shade = query.life_time;"],
				"transitions":[
					{"off_auto":"query.life_time - variable.time_shade >=5"},
					{"off":"
						!query.is_item_name_any('slot.hotbar', 0, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 1, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 2, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 3, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 4, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 5, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 6, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 7, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 8, 'minecraft:torch')
						"}
				],
				"particle_effects":[{"effect":"shade_setup"}]
			},
			"off_auto":{
				"transitions":[
					{"on" :"
						query.is_local_player && ( 
							query.is_item_name_any('slot.hotbar', 0, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 1, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 2, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 3, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 4, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 5, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 6, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 7, 'minecraft:torch') ||	
							query.is_item_name_any('slot.hotbar', 8, 'minecraft:torch')
						)"
					},
					{"off":"
						!query.is_item_name_any('slot.hotbar', 0, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 1, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 2, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 3, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 4, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 5, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 6, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 7, 'minecraft:torch') && 
						!query.is_item_name_any('slot.hotbar', 8, 'minecraft:torch')"
					}
				]
			}
		}
		}
	}
}