Skip to main content

Get 25% OFF on your first order with BisectHosting using code "DAQEM"!

Y Level

The arc:y_level condition type checks if the player's vertical position is within a specified range.

Parameters

ParameterTypeRequiredDefaultDescription
min_yintOptional-2147483648Minimum Y level.
max_yintOptional2147483647Maximum Y level.

Example

The following example gives mining fatigue when below Y level 0.

data/my_datapack/arc/deep_fatigue.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_walk",
"conditions": [
{
"type": "arc:y_level",
"max_y": 0
}
],
"rewards": [
{
"type": "arc:effect",
"effect": {
"id": "minecraft:mining_fatigue",
"duration": 40
}
}
]
}

Compatible Action Types