//bridge-file-version: #2
{
	"format_version": "1.17.0",
	"minecraft:item": {
		"description": {
			"identifier": "strat:cleaver_3",
			"category": "equipment"
		},
		"components": {
			"minecraft:max_stack_size": 1,
			"minecraft:use_duration": 3600,
			"minecraft:hand_equipped": true,
			"minecraft:durability": {
				"max_durability": 2,
				"damage_chance": {
					"min": 1,
					"max": 1
				}
			},
			"minecraft:damage": 7,
			"minecraft:can_destroy_in_creative": false,
			"minecraft:digger": {
				"use_efficiency": true,
				"destroy_speeds": [
					{
						"block": "minecraft:web",
						"speed": 15,
						"on_dig": {
							"event": "hurt_2"
						}
					},
					{
						"block": "minecraft:bamboo",
						"speed": 10,
						"on_dig": {
							"event": "hurt_2"
						}
					}
				],
				"on_dig": {
					"event": "hurt_2"
				}
			},
			"minecraft:display_name": {
				"value": "Wooden Cleaver\n§3Beheading"
			},
			"minecraft:icon": {
				"texture": "cleaver_3"
			},
			"minecraft:creative_category": {
				"parent": "itemGroup.name.sword"
			},
			"minecraft:weapon": {
				"on_hurt_entity": {
					"event": "hurt"
				},
				"on_hit_block": {
					"event": "hurt_2"
				}
			},
			"minecraft:render_offsets": {
				"main_hand": {
					"third_person": {
						"position": [
							0.35,
							1.7,
							-0.7
						],
						"scale": [
							0.144,
							0.144,
							0.144
						]
					},
					"first_person": {
						"position": [
							0.35,
							0.045,
							-0.7
						],
						"scale": [
							0.035,
							0.035,
							0.035
						]
					}
				}
			}
		},
		"events": {
			"hurt": {
				"sequence": [
					{
						"damage": {
							"type": "none",
							"amount": 1,
							"target": "self"
						},
						"run_command": {
							"command": [
								"effect @s mining_fatigue 1 10 true",
								"effect @s weakness 1 3 true"
							],
							"target": "holder"
						}
					},
					{
						"randomize": [
							{
								"run_command": {
									"command": [
										"function beheading"
									],
									"target": "holder"
								},
								"weight": 1
							},
							{
								"weight": 29
							}
						]
					}
				]
			},
			"hurt_2": {
				"damage": {
					"type": "none",
					"amount": 2,
					"target": "self"
				}
			},
			"on_tool_used": {}
		}
	}
}