{
    "format_version": "1.21.60",
    "minecraft:block": {
        "description": {
            "identifier": "sgs_farm:dec_gate_chainlink_dark_oak",
            "menu_category": {
                "category": "construction",
				"group": "minecraft:itemGroup.name.fenceGate"
            },
            "traits": {
                "minecraft:placement_direction": {
                    "enabled_states": ["minecraft:cardinal_direction"]
                }
            },
            "states": {
                "sgs_farm:open": [false, true],
				"sgs_farm:open_south": [false, true],
				"sgs_farm:fence_inventory": [0, 1]
            }
        },
        "components": {
            "minecraft:map_color": "#664c33",
            "minecraft:geometry": {
                "identifier": "geometry.sgs_farm_dec_gate_chainlink",
                "bone_visibility": {
                    "gate_inventory": "!q.block_state('sgs_farm:fence_inventory')",
					"gate_closed": "!q.block_state('sgs_farm:open')",
					"gate_open_north": "q.block_state('sgs_farm:open') && !q.block_state('sgs_farm:open_south')",
					"gate_open_south": "q.block_state('sgs_farm:open') && q.block_state('sgs_farm:open_south')"
                }
            },
			"minecraft:custom_components": [
				"sgs_farm:fence_gate"
			],
            "minecraft:collision_box": {
                "origin": [-8, 0, -2],
                "size": [16, 16, 4]
            },
            "minecraft:selection_box": {
                "origin": [-8, 0, -2],
                "size": [16, 16, 4]
            },
            "minecraft:flammable": {
                "catch_chance_modifier": 5,
                "destroy_chance_modifier": 20
            },
			"minecraft:display_name":"Chainlink Fence Gate Dark Oak\n§o§2Crops & Farms§r",
            "minecraft:destructible_by_mining":{
                "seconds_to_destroy": 1.5,
                "item_specific_speeds":[
                  {"item":{"tags":"query.all_tags('minecraft:is_axe', 'minecraft:wooden_tier')"},"destroy_speed":0.8},
                  {"item":{"tags":"query.all_tags('minecraft:is_axe', 'minecraft:stone_tier')"},"destroy_speed":0.6},
                  {"item":{"tags":"query.all_tags('minecraft:is_axe', 'minecraft:iron_tier')"},"destroy_speed":0.5},
                  {"item":{"tags":"query.all_tags('minecraft:is_axe', 'minecraft:golden_tier')"},"destroy_speed":0.4},
                  {"item":{"tags":"query.all_tags('minecraft:is_axe', 'minecraft:diamond_tier')"},"destroy_speed":0.4},
                  {"item":{"tags":"query.all_tags('minecraft:is_axe', 'minecraft:netherite_tier')"},"destroy_speed":0.3}
                ]
            },
			"tag:fence_gate": {},
            "tag:sgs_farm_fence": {},
			"tag:sgs_farm_gate": {},
            "minecraft:material_instances": {
                "*": {
                    "texture": "sgs_farm_woodwork_misc_dark_oak",
                    "render_method": "alpha_test"
                }
            }
        },
        "permutations": [
            {
                "condition": "query.block_state('minecraft:cardinal_direction') == 'north'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [0, 0, 0]
                    }
                }
            },
            {
                "condition": "query.block_state('minecraft:cardinal_direction') == 'south'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [0, 180, 0]
                    }
                }
            },
            {
                "condition": "query.block_state('minecraft:cardinal_direction') == 'east'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [0, -90, 0]
                    }
                }
            },
            {
                "condition": "query.block_state('minecraft:cardinal_direction') == 'west'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [0, 90, 0]
                    }
                }
            },
            {
                "condition": "q.block_state('sgs_farm:open')",
                "components": {
                    "minecraft:collision_box": false
                }
            }
        ]
    }
}