Skip to content

Block Conditions

Block conditions can be used together with a conditional block replacement to check properties and types of blocks.

Conditions

All conditions follow the same schema which can be found below.

A block condition object
  • type: One of the block condition types defined below
  • Additional fields depending on the value of type, see the respective block condition type documentation for more details.

Supported Types

Always (always)

Always passes.

Root always object
  • type: always

Never (never)

Never passes.

Root never object
  • type: never

And (and)

Only passes if all the sub conditions pass.

Root and object
  • type: and
  • conditions: A list of block conditions

Or (or)

Passes if any one of the sub conditions pass.

Root or object
  • type: or
  • conditions: A list of block conditions

Not (not)

Inverts the result of the sub condition.

Root not object
  • type: not
  • condition: A block condition

Id (id)

Checks if the block matches a specific block id or tag.

Root id object
  • type: id
  • block: A block predicate, must be one of the following.
    • An id like minecraft:dirt
    • A list of ids like ["minecraft:dirt", "minecraft:stone"]
    • A tag like #minecraft:dirt

Properties (properties)

Checks if the block has a certain property value.

Root properties object
  • type: properties
  • properties: The properties to match
    • <key>: The property to check, names can be found in the f3 menu.
      • The value to match, must ALWAYS be formatted as string.

Relative (relative)

Changes the block context for the sub condition.

Root relative object
  • type: relative
  •  offset: The block to check relative to the current position.
    • An array of three ints
    • A string of coordinates parts formatted as x:y:z
    • An object with the coordinate values
      •  x: The x part of the coordinate
      •  y: The y part of the coordinate
      •  z: The z part of the coordinate
  • condition: The condition to check with the offset applied.

In Island (in_island)

Checks if the player in on a certain island.

Root in island object
  • type: in_island
  • island: A skyblock island.
    • Either the value of mode in /locraw or one of the enum values

Timespan (timespan)

Checks if a certain timespan is true.

Root timespan object
  • type: timespan
  • timespan: The identifier of the timespan to check.

Dungeon Floor (dungeon_floor)

Checks if the player is in a certain dungeon floor.

Root dungeon_floor object

Biome (biome)

Checks if the biome the block is in matches.

Root biome object
  • type: biome
  • biome: The identifier of the biome to check.

Tree view icons from the Minecraft.wiki
Not an official Minecraft product. Not approved by or affiliated with Mojang or Microsoft.
Not approved or affiliated with Hypixel.