> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/configs/power-conditions/environment.md).

# Environment and Location Conditions

Every registered condition on this page is documented as an independent reference entry. All entries also support the common condition fields documented on the [Power Conditions](/configs/power-conditions.md) page.

## Registry keys on this page

* `in_water`
* `in_lava`
* `in_rain`
* `in_sunlight`
* `in_structure`
* `light_level`
* `clear_weather`
* `thunder`
* `world`
* `night`
* `environment`

***

## `in_water`

**Purpose:** Checks Bukkit's `Entity#isInWater` state.

**Context:** Default `target`: `TARGET`; requires an entity.

### Fields

| Field    | Default  | Description      |
| -------- | -------- | ---------------- |
| `target` | `TARGET` | Entity selector. |
| `value`  | `true`   | Expected state.  |

### Example

```yaml
type: in_water
target: SOURCE
value: true
```

### Behavior and limits

* The selected entity must exist.

***

## `in_lava`

**Purpose:** Checks whether the block at the selected entity's feet is lava.

**Context:** Default `target`: `TARGET`; requires an entity.

### Fields

| Field    | Default  | Description      |
| -------- | -------- | ---------------- |
| `target` | `TARGET` | Entity selector. |
| `value`  | `true`   | Expected state.  |

### Example

```yaml
type: in_lava
target: SOURCE
value: true
```

### Behavior and limits

* This checks the current feet block material.

***

## `in_rain`

**Purpose:** Checks Bukkit's `Entity#isInRain` state.

**Context:** Default `target`: `TARGET`; requires an entity.

### Fields

| Field    | Default  | Description      |
| -------- | -------- | ---------------- |
| `target` | `TARGET` | Entity selector. |
| `value`  | `true`   | Expected state.  |

### Example

```yaml
type: in_rain
target: SOURCE
value: true
```

### Behavior and limits

* The selected entity must exist.

***

## `in_sunlight`

**Purpose:** Checks a simplified daylight and sky-light exposure rule.

**Context:** Default `target`: `TARGET`; requires an entity.

### Fields

| Field    | Default  | Description      |
| -------- | -------- | ---------------- |
| `target` | `TARGET` | Entity selector. |
| `value`  | `true`   | Expected state.  |

### Example

```yaml
type: in_sunlight
target: SOURCE
value: true
```

### Behavior and limits

* Sunlight is true when world time is below 12300 and sky light at the entity block is at least 15.
* Weather is not checked directly.

***

## `in_structure`

**Purpose:** Checks whether a location lies inside one of the configured generated-structure bounding boxes.

**Context:** Default `target`: `TARGET`; if the entity is unavailable, the trigger location is used.

### Fields

| Field        | Default  | Description                      |
| ------------ | -------- | -------------------------------- |
| `target`     | `TARGET` | Entity selector.                 |
| `structure`  | empty    | Single namespaced structure key. |
| `structures` | empty    | List of accepted structure keys. |

### Example

```yaml
type: in_structure
target: SOURCE
structures:
  - minecraft:fortress
  - minecraft:bastion_remnant
```

### Behavior and limits

* Only structures reported for the current chunk are inspected.
* The resolved point must be inside the generated structure bounding box.

***

## `light_level`

**Purpose:** Checks total block light.

**Context:** Uses the source/location required by the implementation; no configurable selector in the shared implementation.

### Fields

| Field | Default | Description                    |
| ----- | ------- | ------------------------------ |
| `min` | `0`     | Inclusive minimum light level. |
| `max` | `15`    | Inclusive maximum light level. |

### Example

```yaml
type: light_level
min: 0
max: 7
```

### Behavior and limits

* Reads the combined block light value.

***

## `clear_weather`

**Purpose:** Checks whether the context world has no storm.

**Context:** Requires a resolved location and world.

### Fields

| Field   | Default | Description                   |
| ------- | ------- | ----------------------------- |
| `value` | `true`  | Expected clear-weather state. |

### Example

```yaml
type: clear_weather
value: true
```

### Behavior and limits

* `value: false` requires stormy weather but does not specifically require thunder.

***

## `thunder`

**Purpose:** Checks whether the context world is thundering.

**Context:** Requires a resolved location and world.

### Fields

| Field   | Default | Description                |
| ------- | ------- | -------------------------- |
| `value` | `true`  | Expected thundering state. |

### Example

```yaml
type: thunder
value: true
```

### Behavior and limits

* A missing location or world does not match.

***

## `world`

**Purpose:** Matches the world name at the trigger location.

**Context:** Requires a resolved location and world.

### Fields

| Field    | Default | Description                   |
| -------- | ------- | ----------------------------- |
| `world`  | empty   | Single world name.            |
| `worlds` | empty   | List of accepted world names. |

### Example

```yaml
type: world
worlds:
  - world
  - world_nether
```

### Behavior and limits

* At least one name is required.
* Matching uses the actual Bukkit world name.

***

## `night`

**Purpose:** Checks a fixed vanilla-style night time range.

**Context:** Requires a valid world from the source/context.

### Fields

| Field   | Default | Description           |
| ------- | ------- | --------------------- |
| `value` | `true`  | Expected night state. |

### Example

```yaml
type: night
value: true
```

### Behavior and limits

* Night is defined as world time 12300 through 23850 inclusive.
* Weather and sky visibility are not considered.

***

## `environment`

**Purpose:** Matches a world dimension and optionally a biome.

**Context:** Default `target`: `SOURCE`; selected entity must exist.

### Fields

| Field       | Default  | Description                                                        |
| ----------- | -------- | ------------------------------------------------------------------ |
| `target`    | `SOURCE` | Entity selector.                                                   |
| `dimension` | empty    | Bukkit world environment such as `NORMAL`, `NETHER`, or `THE_END`. |
| `biomes`    | empty    | Accepted biome enum names or namespaced keys.                      |

### Example

```yaml
type: environment
target: SOURCE
dimension: NETHER
biomes:
  - BASALT_DELTAS
  - minecraft:soul_sand_valley
```

### Behavior and limits

* If `dimension` is configured it must match before biome checks.
* When both dimension and biome lists are empty, the condition fails.

***
