▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Get Block
Get Block

Get Block

A function to get the block's id, state, and data.

116
1

Get Block

This library allows to get block placed at current execution context.

banner

Usage

All functions return result to storage getblock:.

getblock:block

Input: None
Output:

  • id: ID of the block
  • short_id: Un-namespaced ID of the block
  • state: State of the block
  • data: Data obtained by command data get block ~ ~ ~
  • x, y, z: Coordinates of the block
function getblock:block
data get storage getblock: output
{
  "id": "minecraft:dispenser",
  "short_id": "dispenser",
  "state": {
    "triggered": "false",
    "facing": "north"
  },
  "data": {
    "Items": [],
    "x": 0,
    "y": 56,
    "z": 0,
    "id": "minecraft:dispenser"
  },
  "x": 0,
  "y": 56,
  "z": 0
}

getblock:id

Get only id
Input: None
Output:

  • id: ID of the block
{
  "id": "minecraft:dispenser"
}

getblock:state

Get only state
Input: None
Output:

  • state: State of the block
{
  "state": {
    "triggered": "false",
    "facing": "north"
  }
}

Совместимость

Minecraft: Java Edition

1.21.x1.20.x1.19.x1.18.x1.17.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Создатели

Детали

Лицензия:MIT
Опубликован:1 год назад
Обновлён:9 месяцев назад
Главная