[
  {
    "condition": "minecraft:any_of",
    "terms": [
      {
        "condition": "minecraft:reference",
        "name": "manic:entity/spectre/spawn_valid/underwater"
      },
      {
        "condition": "minecraft:inverted",
        "term": {
          "condition": "minecraft:location_check",
          "predicate": {
            "fluid": {
              "tag": "minecraft:water"
            }
          }
        }
      }
    ]
  },
  {
    "condition": "minecraft:inverted",
    "term": {
      "condition": "minecraft:reference",
      "name": "manic:world/deep_dark"
    }
  },
  {
    "condition": "minecraft:any_of",
    "terms": [
      {
        "condition": "minecraft:location_check",
        "predicate": {
          "dimension": "minecraft:the_nether"
        }
      },
      {
        "condition": "minecraft:inverted",
        "term": {
          "condition": "minecraft:location_check",
          "offsetY": -1,
          "predicate": {
            "block": {
              "blocks": [
                "minecraft:magma_block"
              ]
            }
          }
        }
      }
    ]
  },
  {
    "condition": "minecraft:any_of",
    "terms": [
      {
        "condition": "minecraft:reference",
        "name": "manic:entity/spectre/spawn_valid/surface_night"
      },
      {
        "condition": "minecraft:location_check",
        "predicate": {
          "dimension": "minecraft:the_end",
          "light": {
            "light": {
              "max": 9
            }
          }
        }
      },
      {
        "condition": "minecraft:location_check",
        "predicate": {
          "light": {
            "light": {
              "max": 7
            }
          }
        }
      }
    ]
  },
  {
    "condition": "minecraft:location_check",
    "offsetY": 1,
    "predicate": {
      "block": {
        "tag": "nucleus:passthrough"
      }
    }
  },
  {
    "condition": "minecraft:location_check",
    "predicate": {
      "block": {
        "tag": "nucleus:passthrough"
      }
    }
  },
  {
    "condition": "minecraft:any_of",
    "terms": [
      {
        "condition": "minecraft:location_check",
        "offsetY": -1,
        "predicate": {
          "block": {
            "tag": "minecraft:stairs",
            "state": {
              "half": "top"
            }
          }
        }
      },
      {
        "condition": "minecraft:location_check",
        "offsetY": -1,
        "predicate": {
          "block": {
            "tag": "minecraft:trapdoors",
            "state": {
              "half": "top",
              "open": "false"
            }
          }
        }
      },
      {
        "condition": "minecraft:location_check",
        "offsetY": -1,
        "predicate": {
          "block": {
            "tag": "minecraft:slabs",
            "state": {
              "type": "top"
            }
          }
        }
      },
      {
        "condition": "minecraft:location_check",
        "offsetY": -1,
        "predicate": {
          "block": {
            "tag": "minecraft:slabs",
            "state": {
              "type": "double"
            }
          }
        }
      },
      {
        "condition": "minecraft:location_check",
        "offsetY": -1,
        "predicate": {
          "block": {
            "tag": "nucleus:opaque"
          }
        }
      },
      {
        "condition": "minecraft:reference",
        "name": "manic:entity/spectre/spawn_valid/underwater"
      }
    ]
  }
]
