sphere
Fill a sphere of blocks at a center position.
shapes.sphere(
GRASS,
pos(0, 0, 0),
0,
ShapeOperation.Replace
)
The sphere has a radius which is the distance from the center of the sphere to its outside edge. The center of the sphere is the middle point (position) that the sphere surrounds.
Parameters
- block: the type of block for the sphere, such as: GRAVEL
- center: the position of the center of the sphere
- radius: the radius of the sphere, in blocks
- ShapeOperation: the method for placing blocks, inside or around the sphere
Example
Make a chat command to suspend a ball of granite above the player. Let’s hope it doesn’t fall!
player.onChat("toprock", function () {
shapes.sphere(
GRANITE,
pos(0, 5, 0),
3,
ShapeOperation.Replace
)
})