Skip to content

Commit c36fa90

Browse files
committed
sr: add moon phase condition
1 parent af6428c commit c36fa90

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

wikis/summoningrituals/docs/recipe/conditions.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,32 @@ Function: `maxLightLevel(Integer max)`
176176
)
177177
```
178178

179+
## Moon Phase
180+
181+
The moon phase check ensures the ritual is only started at the given moon phase.
182+
183+
If you want to read more about moon phases and how they are calculated, check the [official Minecraft wiki article](https://minecraft.wiki/w/Moon#Phases).
184+
185+
Function: `moonPhase(MoonPhase phase)`<br>
186+
Available Options:
187+
188+
- `FULL_MOON`
189+
- `WANING_GIBBOUS`
190+
- `THIRD_QUARTER`
191+
- `WANING_CRESCENT`
192+
- `NEW_MOON`
193+
- `WAXING_CRESCENT`
194+
- `FIRST_QUARTER`
195+
- `WAXING_GIBBOUS`
196+
197+
```js
198+
.conditions(c =>
199+
c.moonPhase(SummoningMoonPhase.FULL_MOON) // [!code focus:3]
200+
// or
201+
c.moonPhase("full_moon")
202+
)
203+
```
204+
179205
## Open Sky
180206

181207
The open sky check ensures the ritual is only started when the altar block has an open sky. This means that the block has to be exposed to the sky (no blocks above it). By default, it does not matter if the altar block has an open sky or not. This means that by passing `false`, you can ensure that the altar block does not have an open sky.

0 commit comments

Comments
 (0)