fill block||doc135396

September 20, 2022

Format

 Map:fillBlocks(min, max, fullName) 
  • The class to which the function belongs:Map

Description

Fills a square in an area consisting of the smallest and largest coordinates.


Precautions

  • The min coordinate must be less than the max coordinate, otherwise the block cannot be filled.
  • The values for each axis of the min and max coordinates must be integers, otherwise unintended consequences will occur.

Parameters

Variable name type Description
min Vector3 Minimum coordinates
max Vector3 maximum coordinate
fullName string block configuration name


Code Samples

on the server sideglobal script, fill an area with grass blocks

local map = World.CurWorld:getMap("map001")
map:fillBlocksConfigId({x = 0, y = 0, z = 0}, {x = 2, y = 2, z = 2},"myplugin/grass")