get block id||doc135394

September 20, 2022

Format

 Map:getBlockConfigId(pos) 
  • The class to which the function belongs:Map

Description

Returns the block ID at specific coordinates in the map.


Precautions

  • The values of each axis of the pos coordinate must be integers, otherwise there will be unintended consequences.

Parameters

Variable name type Description
pos Vector3 coordinate


Value Returned

type Description
int BlockId


Code Samples

on the server sideglobal script, get the id of the block whose coordinates are 0, 0, 0 in the map

local map = World.CurWorld:getMap("map001")
local blockId = map:getBlockConfigId({x=0, y=0, z=0})