{
  "format_version": "1.21.80",
  "minecraft:block": {
    "description": {
      "identifier": "mnp_ci:palm_slab",
      "menu_category": {
        "category": "none"
      },
      "traits": {
        "minecraft:placement_position": {
          "enabled_states": ["minecraft:vertical_half"]
        }
      },
      "states": {
        "mnp_ci:double": [false, true]
      }
    },
    "permutations": [
      // Bottom Slab
      {
        "condition": "q.block_state('minecraft:vertical_half') == 'bottom' && !q.block_state('mnp_ci:double')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-8, 0, -8],
            "size": [16, 8, 16]
          },
          "minecraft:selection_box": {
            "origin": [-8, 0, -8],
            "size": [16, 8, 16]
          }
        }
      },
      // Top Slab
      {
        "condition": "q.block_state('minecraft:vertical_half') == 'top' && !q.block_state('mnp_ci:double')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-8, 8, -8],
            "size": [16, 8, 16]
          },
          "minecraft:selection_box": {
            "origin": [-8, 8, -8],
            "size": [16, 8, 16]
          }
        }
      },
      // Double Slab
      {
        "condition": "q.block_state('mnp_ci:double')",
        "components": {
          "minecraft:geometry": "minecraft:geometry.full_block",
          "minecraft:loot": "loot_tables/mnp_ci/palm_tree/palm_double_slab.json"
        }
      }
    ],
    "components": {
      "minecraft:loot": "loot_tables/mnp_ci/palm_tree/palm_slab.json",
      "minecraft:destructible_by_explosion": {
        "explosion_resistance": 6
      },
      "minecraft:liquid_detection": {
        "detection_rules": [
          {
            "liquid_type": "water",
            "can_contain_liquid": true, // Waterloggable
            "on_liquid_touches": "no_reaction" // Water flows through the block like air
          }
        ]
      },
      "tag:mnp_ci:custom_slab": {},
      "minecraft:geometry": {
        "identifier": "geometry.mnp_ci.slab",
        "bone_visibility": {
          "bottom_slab": "q.block_state('minecraft:vertical_half') == 'bottom'",
          "top_slab": "q.block_state('minecraft:vertical_half') == 'top'"
        }
      },
      "minecraft:flammable": {
        "destroy_chance_modifier": 20,
        "catch_chance_modifier": 5
      },
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 3,
        "item_specific_speeds": [
          {
            "destroy_speed": 1.5,
            "item": {
              "tags": "q.all_tags('minecraft:is_axe', 'minecraft:wooden_tier')"
            }
          },
          {
            "destroy_speed": 0.75,
            "item": {
              "tags": "q.all_tags('minecraft:is_axe', 'minecraft:stone_tier')"
            }
          },
          {
            "destroy_speed": 0.5,
            "item": {
              "tags": "q.all_tags('minecraft:is_axe', 'minecraft:iron_tier')"
            }
          },
          {
            "destroy_speed": 0.25,
            "item": {
              "tags": "q.all_tags('minecraft:is_axe', 'minecraft:golden_tier')"
            }
          },
          {
            "destroy_speed": 0.4,
            "item": {
              "tags": "q.all_tags('minecraft:is_axe', 'minecraft:diamond_tier')"
            }
          },
          {
            "destroy_speed": 0.35,
            "item": {
              "tags": "q.all_tags('minecraft:is_axe', 'minecraft:netherite_tier')"
            }
          }
        ]
      },
      "minecraft:custom_components": ["mnp_ci:slab_on_interact"], // Adds our custom on_interact component
      "minecraft:material_instances": {
        "*": {
          "texture": "mnp_ci:palm_tree_planks",
          "render_method": "opaque"
        }
      },
      "minecraft:map_color": "#bfbb94"
    }
  }
}
