Skip to content
Omar Mohamed edited this page Mar 24, 2026 · 2 revisions

Block

Represents a block in the world. Provides information about its state, position, light levels, and properties.


Functions

getName()

Returns the item/block name as a string.

  • Returns: String — e.g. "minecraft:stone", "minecraft:grass_block"
make block player.getSteppingBlock()
say block.getName()
~ Output: "minecraft:stone"

hasBlockTag(tagID)

Checks whether the block has a tag matching the given string (case-insensitive, partial match).

  • Parameters:
    • tagIDString — The tag ID to search for (e.g. "minecraft:logs")
  • Returns: Boolean
make block player.getSteppingBlock()
check block.hasBlockTag("minecraft:logs") do
    say "Standing on a log!"
end

getPosition()

Returns the block's world position.

make block player.getSteppingBlock()
make pos block.getPosition()
say pos.toString()

getBlockLightLevel()

Returns the block light level at this block's position (0–15).

  • Returns: Integer
make block player.getSteppingBlock()
say block.getBlockLightLevel()

getSkyLightLevel()

Returns the sky light level at this block's position (0–15).

  • Returns: Integer
make block player.getSteppingBlock()
say block.getSkyLightLevel()

getInstrument()

Returns the note block instrument sound ID associated with this block.

  • Returns: String — e.g. "block.note_block.harp"
make block player.getSteppingBlock()
say block.getInstrument()

isSolid()

Returns whether this block is a solid block.

  • Returns: Boolean

isAir()

Returns whether this block is air.

  • Returns: Boolean

isBurnable()

Returns whether this block can catch fire.

  • Returns: Boolean

isTransparent()

Returns whether this block is transparent.

  • Returns: Boolean

isOpaque()

Returns whether this block is opaque.

  • Returns: Boolean

isOpaqueFullCube()

Returns whether this block is both opaque and a full cube.

  • Returns: Boolean
make block player.getSteppingBlock()
check block.isSolid() do
    say "Solid block"
end
check block.isAir() do
    say "Air block"
end
check block.isBurnable() do
    say "This block can burn"
end

toString()

Returns the full block state as a string, including block properties.

  • Returns: String — e.g. "Block{minecraft:oak_log, axis=y}"
make block player.getSteppingBlock()
say block.toString()

📖 InteractiveStuff Docs


🧱 Types


⚙️ Scripting

📃 Built-in Library

Clone this wiki locally