{
  "type": "minecraft:condition",
  "if_true": {
    "type": "minecraft:stone_depth",
    "add_surface_depth": false,
    "offset": 0,
    "secondary_depth_range": 0,
    "surface_type": "floor"
  },
  "then_run": {
    "type": "minecraft:condition",
    "if_true": {
      "type": "minecraft:water",
      "add_stone_depth": false,
      "offset": -1,
      "surface_depth_multiplier": 0
    },
    "then_run": {
      "type": "minecraft:sequence",
      "sequence": [
        {
          "type": "minecraft:condition",
          "if_true": {
            "type": "minecraft:water",
            "add_stone_depth": false,
            "offset": 0,
            "surface_depth_multiplier": 0
          },
          "then_run": {
            "type": "minecraft:sequence",
            "sequence": [
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:y_above",
                  "add_stone_depth": false,
                  "surface_depth_multiplier": 0,
                  "anchor": {
                    "absolute": %d
                  }
                },
                "then_run": {
                  "type": "minecraft:condition",
                  "if_true": {
                    "type": "minecraft:not",
                    "invert": {
                      "type": "minecraft:y_above",
                      "add_stone_depth": false,
                      "surface_depth_multiplier": 0,
                      "anchor": {
                        "absolute": %d
                      }
                    }
                  },
                  "then_run": {
                    "type": "minecraft:block",
                    "result_state": %s
                  }
                }
              },
              {
                "type": "minecraft:block",
                "result_state": %s
              }
            ]
          }
        },
        {
          "type": "minecraft:block",
          "result_state": %s
        }
      ]
    }
  }
}
