get block||doc135393

September 20, 2022

Format

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

Description

Get the block configuration information at the specified coordinates.


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 specified location


Value Returned

type Description
config Block configuration information


Code Samples

local map = World.CurWorld:getMap("map001")
local blockCfg = map:getBlock({x=0, y=1, z=0})