Targeted Block (Expression) — Skript

Addon: Skript · Category: Expression · Since: 1.0, 2.9.0 (actual/exact)

Syntax

[the] [(actual[ly]|exact)] target[ed] block[s] [of %livingentities%]

Description

The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression. The actual target block will regard the actual hit box of the block.

Examples

set target block of player to stone
set target block of player to oak_stairs[waterlogged=true]
break target block of player using player's tool
give player 1 of type of target block
teleport player to location above target block
kill all entities in radius 3 around target block of player
set {_block} to actual target block of player
break actual target block of player

View source