🌏World

Name
Description
Required
Type
Default

creatorDef

Def name to spawn in for the creator (only the host by default)

No

String

"PlayerDefault"

playerDef

Def name to spawn in for regular players (everyone but the host by default)

No

String

"PlayerDefault"

despawnTime

Amount of time before an entity with enforce333: false despawns. In the case of RBChunk, despawn time is multiplied by number of blocks. -1 to never despawn.

No

Number

10

cacheDistance

Number of chunks outside the rendering diameter to keep cached. This should be at least 2

No

Integer

8

defs

Custom mod defs to load

No

Array

client

Client-sided init script callback. Each mod's client callback will run before this is called. The function runs in the global scope and can't access anything from the server's planet script. Must set this property using : or = (no "client() {}" shorthand)

No

Function

chunkScene

No

Object

chunkScene::chunkSize

Length/height/depth of a chunk in blocks. Doesn't necessarily have to be a power of 2

No

Integer

16

chunkScene::raycastLength

Default raycast length/distance when doing a raycast test, in blocks. -1 for infinity

No

Number

6

chunkScene::fogColor

No

Color

0xedecd7

chunkScene::fogFactor

Percentage of view to obscure with fog in range [0, 1]

No

Number

0.5

chunkScene::gravity

Acceleration constant due to gravity in blocks/second squared

No

Vec3

[0, -30, 0]

chunkScene::searchSpawnAboveground

Whether to search for a default spawn point aboveground. Useful if there's a chance that the spawn will be underwater

No

Boolean

false

chunkScene::searchSpawnLimit

How far forward to search for an aboveground spawn point before giving up, in blocks

No

Number

250

chunkScene::ignoreIncorrectGeneratorError

Allows you to load a save file regardless of the specified planet generators. It will look broken

No

Boolean

false

chunkScene::waterEnabled

Whether to create the infinite plane of fake water

No

Boolean

true

chunkScene::fakeWater

No

Object

chunkScene::fakeWater::waterHeight

Y value of infinite water plane's position

No

Number

0.3

chunkScene::fakeWater::waterOpacity

Range [0, 1]

No

Number

0.8

chunkScene::fakeWater::waterColor

No

Color

0x83F7F7

chunkScene::fakeWater::waterFoamColor

No

Color

"white"

chunkScene::mapID

Reserved

chunkScene::mapReorderBlocks

Reserved

sky

No

Object

sky::dayLength

Length of one full day cycle in seconds. -1 for infinity (time never changes)

No

Number

-1

sky::hemiIntensity

Intensity of the hemisphere light

No

Number

0.4

sky::minGround

Minimum amount of ground hemisphere light

No

Number

0.1

sky::minGroundSunY

Sun's y position when ground hemisphere light is

No

Number

-0.25

sky::maxGround

Maximum amount of ground hemisphere light

No

Number

1

sky::maxGroundSunY

Sun's y position when ground hemisphere light is at a maximum. maxDiffuse + maxGround should be <= 1. Note sun y is a sinusoidal function of time

No

Number

0

sky::maxDiffuse

Maximum amount of diffuse (directional) light, at high noon. maxDiffuse + maxGround should be <= 1

No

Number

0.75

sky::sunScale

No

Number

0.33

sky::moonScale

No

Number

0.25

sky::starSize

glPointSize

No

Number

1.5

sky::starCount

No

Integer

400

sky::skyColor

Function to calculate sky color based on sun's y position. Note sun y is the sun's sinusoidally-varying height in range [-1, 1]. Arguments are (Number suny, Color out). The Color argument is an actual three.js Color object.

No

Function

sky::time

Initial time when planet is created

No

Number

11:30am

sky::azimuth

Angle that affects where the sun sets and rises, in radians

No

Number

random

sky::envMap

defCubeTexture options. If no envMap is specified, one will be procedurally generated

No

Object

selector

No

Object

selector::pointerRadius

Maximum number of pixels your finger can travel on mobile before the tap is registered as a camera swivel instead of a tap

No

Number

10

selector::colorNormal

Selector box color while invert is disabled

No

Color

"black"

selector::colorInvert

elector box color while invert is enabled

No

Color

"red"

selector::breakWhitelist

If canBuild is disabled, this is a list of string block types that can be broken

No

Array

vignette

No

Object

vignette::painColor

No

Color

red

vignette::painSoftness

No

Number

1.5

vignette::constantColor

No

Color

0x808080

vignette::constantSoftness

No

Number

1

entities

Reserved

targetID

Reserved

game

Reserved

/**
 * Planet:
 * OPT String creatorDef ["PlayerDefault"] - Def name to spawn in for the creator (only the host by default)
 * OPT String playerDef ["PlayerDefault"] - Def name to spawn in for regular players (everyone but the host by default)
 * OPT Number despawnTime [10] - Amount of time before an entity with enforce333: false despawns. In the case of RBChunk, despawn time is multiplied by number of blocks. -1 to never despawn.
 * OPT Integer cacheDistance [8] - Number of chunks outside the rendering diameter to keep cached. This should be at least 2
 * OPT Array defs - Custom mod defs to load
 * OPT Function client - Client-sided init script callback. Each mod's client callback will run before this is called. The function runs in the global scope and can't access anything from the server's planet script. Must set this property using : or = (no "client() {}" shorthand)
 * OPT Object chunkScene
 *     OPT Integer chunkSize [16] - Length/height/depth of a chunk in blocks. Doesn't necessarily have to be a power of 2
 *     OPT Number raycastLength [6] - Default raycast length/distance when doing a raycast test, in blocks. -1 for infinity
 *     OPT Color fogColor [0xedecd7]
 *     OPT Number fogFactor [0.5] - Percentage of view to obscure with fog in range [0, 1]
 *     OPT Vector3 gravity [0, -30, 0] - Acceleration constant due to gravity in blocks/second squared
 *     OPT Boolean searchSpawnAboveground [false] - Whether to search for a default spawn point aboveground. Useful if there's a chance that the spawn will be underwater
 *     OPT Number searchSpawnLimit [250] - How far forward to search for an aboveground spawn point before giving up, in blocks
 *     OPT Boolean ignoreIncorrectGeneratorError [false] - Allows you to load a save file regardless of the specified planet generators. It will look broken
 *     OPT Boolean waterEnabled [true] - Whether to create the infinite plane of fake water
 *     OPT Object fakeWater
 *         OPT Number waterHeight[0.3] - Y value of infinite water plane's position
 *         OPT Number waterOpacity [0.8] - Range [0, 1]
 *         OPT Color waterColor [0x83F7F7]
 *         OPT Color waterFoamColor ["white"]
 *     RES mapID
 *     RES mapReorderBlocks
 * OPT Object sky
 *     OPT Number dayLength [-1] - Length of one full day cycle in seconds. -1 for infinity (time never changes)
 *     OPT Number hemiIntensity [0.4] - Intensity of the hemisphere light
 *     OPT Number minGround [0.1] - Minimum amount of ground hemisphere light
 *     OPT Number minGroundSunY [-0.25] - Sun's y position when ground hemisphere light is at a minimum. Note sun y is a sinusoidal function of time
 *     OPT Number maxGround [1] - Maximum amount of ground hemisphere light
 *     OPT Number maxGroundSunY [0] - Sun's y position when ground hemisphere light is at a maximum. maxDiffuse + maxGround should be <= 1. Note sun y is a sinusoidal function of time
 *     OPT Number maxDiffuse [0.75] - Maximum amount of diffuse (directional) light, at high noon. maxDiffuse + maxGround should be <= 1
 *     OPT Number sunScale [0.33]
 *     OPT Number moonScale [0.25]
 *     OPT Number starSize [1.5] - glPointSize
 *     OPT Integer starCount [400]
 *     OPT Function skyColor - Function to calculate sky color based on sun's y position. Note sun y is the sun's sinusoidally-varying height in range [-1, 1]. Arguments are (Number suny, Color out). The Color argument is an actual three.js Color object.
 *     OPT Number time [11:30 AM] - Initial time when planet is created
 *     OPT Number azimuth [random] - Angle that affects where the sun sets and rises, in radians
 *     OPT Object envMap - defCubeTexture options. If no envMap is specified, one will be procedurally generated
 * OPT Object selector
 *     OPT Entity selectingTarget [planet.player] - Entity to attach to
 *     OPT Number pointerRadius [10] - Maximum number of pixels your finger can travel on mobile before the tap is registered as a camera swivel instead of a tap
 *     OPT Color colorNormal ["black"] - Selector box color while invert is disabled
 *     OPT Color colorInvert ["red"] - Selector box color while invert is enabled
 *     OPT Array breakWhitelist - If canBuild is disabled, this is a list of string block types that can be broken
 * OPT Object vignette
 *     OPT Color vignettePainColor ["red"]
 * RES entities
 * RES targetID
 */

Last updated