Skip to main content

Block Condition Types

Block conditions check properties of a block at a location.

origins:adjacent

Checks if a matching block is adjacent.

FieldTypeDefaultDescription
adjacent_conditionBlock ConditionrequiredCondition for adjacent blocks
comparisonStringoptionalComparison for matching count
compare_toIntegeroptionalCount to compare against
Example
"block_condition": {
"type": "origins:adjacent",
"adjacent_condition": {
"type": "origins:block",
"block": "minecraft:iron_ore"
},
"comparison": ">=",
"compare_to": 4
}

This example will check if there are four or more Iron Ore blocks next to the block in question.

origins:air

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether the target block is air.

FieldTypeDefaultDescription
None---

origins:attachable

Checks whether the block is in a place where a supported block can be attached (i.e. checks whether any of the adjacent blocks' sides towards this block position are solid).

origins:blast_resistance

Checks the block's blast resistance.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"block_condition": {
"type": "origins:blast_resistance",
"comparison": ">=",
"compare_to": 1200
}

This example will check if the blast resistance value of the block is that of an Obsidian block or greater.

origins:block_entity

Checks if the block has a block entity.

origins:block_id

Checks the block's ID.

FieldTypeDefaultDescription
blockIdentifierrequiredBlock ID
Example
"block_condition": {
"type": "origins:block_id",
"block": "minecraft:stone"
}

This example will check if there are four or more Iron Ore blocks next to the block in question.

origins:block_state

Checks a specific block state property.

FieldTypeDefaultDescription
propertyStringrequiredProperty name
valueStringrequiredExpected value
comparisonStringoptionalComparison type
Example
"block_condition": {
"type": "origins:and",
"conditions": [
{
"type": "origins:block",
"block": "minecraft:chest"
},
{
"type": "origins:block_state",
"property": "facing",
"enum": "north"
}
]
}

This example will check if a Chest block is facing north.

origins:distance_from_coordinates

Checks the block's distance from coordinates.

FieldTypeDefaultDescription
xFloat0Reference X
yFloat0Reference Y
zFloat0Reference Z
comparisonStringrequiredComparison operator
compare_toFloatrequiredDistance value
Example
"block_condition": {
"type": "origins:distance_from_coordinates",
"offset": {
"x": 1024,
"z": 512
},
"ignore_y": true,
"comparison": "<",
"compare_to": 8
}

This example will check if the block is within an 8 blocks radius relative to the specified coordinates (X: 1024, Z: 512).

origins:exposed_to_sky

Checks if the block is exposed to the sky.

origins:fluid

Checks the fluid at the block position.

FieldTypeDefaultDescription
fluid_conditionFluid ConditionrequiredFluid condition to evaluate
Example
"block_condition": {
"type": "origins:fluid",
"fluid_condition": {
"type": "origins:still"
}
}

This example will check if the block is a source fluid.

origins:hardness

Checks the block's hardness.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"block_condition": {
"type": "origins:hardness",
"comparison": "==",
"compare_to": 1.5
}

This example will check if the block is as hard as Stone.

origins:height

Checks the block's height (Y-level).

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredY-level to compare against
Example
"block_condition": {
"type": "origins:height",
"comparison": "<=",
"compare_to": 64
}

This example will check if the blast resistance value of the block is that of an Obsidian block or greater.

origins:in_rain

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether rain reaches the target block.

FieldTypeDefaultDescription
None---

origins:in_tag

Checks if the block is in a block tag.

FieldTypeDefaultDescription
tagIdentifierrequiredBlock tag ID
Example
"block_condition": {
"type": "origins:in_tag",
"tag": "origins:natural_stone"
}

This example checks if the block is a Diamond Block.

origins:light_blocking

Checks whether the block is marked in code as blocking light. Glass for example would not fulfill this condition.

origins:light_level

Checks the light level at the block.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toIntegerrequiredLight level to compare against
light_typeStringblockblock or sky
Example
"block_condition": {
"type": "origins:light_level",
"comparison": ">",
"compare_to": 7
}

This example will check if a Chest block is facing north.

origins:movement_blocking

Checks if the block blocks movement (solid).

origins:nbt

Checks the block entity's NBT data.

FieldTypeDefaultDescription
nbtStringrequiredNBT query string
Example
"block_condition": {
"type": "origins:and",
"conditions": [
{
"type": "origins:block",
"block": "minecraft:beacon"
},
{
"type": "origins:nbt",
"nbt": "{Levels: 1}"
}
]
}

This example will check if Beacon block has a Level value of 1.

origins:raining

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether it is currently raining in the level.

FieldTypeDefaultDescription
None---

origins:replaceable

Checks if the block can be replaced by another block (i.e. if it's a non-solid block like tall grass or air).

origins:slipperiness

Checks the block's slipperiness.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredValue to compare against
Example
"block_condition": {
"type": "origins:slipperiness",
"comparison": "==",
"compare_to": 0.98
}

This example will check if the block has the same slipperiness of an Ice (or Packed Ice) block.

origins:thundering

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether it is currently thundering in the level.

FieldTypeDefaultDescription
None---

origins:water_loggable

Checks if the block can be waterlogged.