> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/examples/blockbelow.md).

# BlockBelow

Tells you when you step onto a different block, and warns on blocks that hurt or slow you.

```javascript
script.description = "Names the block you stand on.";

const hazards = ["minecraft:magma_block", "minecraft:soul_sand", "minecraft:honey_block", "minecraft:powder_snow"];
let last = "";

script.addListener("PostTickEvent", () => {
    const player = mc.player;
    const level = mc.level;
    if (!player || !level || !player.onGround) return;

    const state = level.getBlockState(player.blockPosBelow);
    if (state.block === last) return;
    last = state.block;

    const warning = hazards.includes(state.block) || state.is("#minecraft:fire") ? " (careful!)" : "";
    mc.displayMessage("Standing on " + state.block + warning);
});
```
