API reference / @jsprismarine/script-host / host/worldsystem/seam
host/worldsystem/seam
Interfaces
ScriptBiome
Defined in: script-host/src/host/worldsystem/seam.ts:42
A biome as BiomeType reads it.
Properties
id
readonlyid:string
Defined in: script-host/src/host/worldsystem/seam.ts:43
tags
readonlytags: readonlystring[]
Defined in: script-host/src/host/worldsystem/seam.ts:44
ScriptChunkArea
Defined in: script-host/src/host/worldsystem/seam.ts:58
A rectangle of chunks, inclusive, by chunk coordinates.
Properties
maxX
readonlymaxX:number
Defined in: script-host/src/host/worldsystem/seam.ts:60
maxZ
readonlymaxZ:number
Defined in: script-host/src/host/worldsystem/seam.ts:62
minX
readonlyminX:number
Defined in: script-host/src/host/worldsystem/seam.ts:59
minZ
readonlyminZ:number
Defined in: script-host/src/host/worldsystem/seam.ts:61
ScriptExplosion
Defined in: script-host/src/host/worldsystem/seam.ts:48
An explosion a script sets off, as ExplosionOptions describes it.
Properties
allowUnderwater
readonlyallowUnderwater:boolean
Defined in: script-host/src/host/worldsystem/seam.ts:52
breaksBlocks
readonlybreaksBlocks:boolean
Defined in: script-host/src/host/worldsystem/seam.ts:50
causesFire
readonlycausesFire:boolean
Defined in: script-host/src/host/worldsystem/seam.ts:51
radius
readonlyradius:number
Defined in: script-host/src/host/worldsystem/seam.ts:49
source?
readonlyoptionalsource?:string
Defined in: script-host/src/host/worldsystem/seam.ts:54
The entity answerable for it.
ScriptFogLayer
Defined in: script-host/src/host/worldsystem/seam.ts:83
One layer of a player's fog stack: a fog definition's id and the tag a script gave it.
Properties
fogId
readonlyfogId:string
Defined in: script-host/src/host/worldsystem/seam.ts:84
tag
readonlytag:string
Defined in: script-host/src/host/worldsystem/seam.ts:85
ScriptLight
Defined in: script-host/src/host/worldsystem/seam.ts:34
The light at a block, as getLightLevel and getSkyLightLevel read it, 0 to 15.
Properties
level
readonlylevel:number
Defined in: script-host/src/host/worldsystem/seam.ts:36
The brightest of the block light and the sky light there; 0 inside an opaque block.
sky
readonlysky:number
Defined in: script-host/src/host/worldsystem/seam.ts:38
The sky light there, read as if the block let it through, as BDS reads it.
ScriptLootPlace
Defined in: script-host/src/host/worldsystem/seam.ts:89
Where loot is rolled, for the conditions and functions that read the place.
Properties
dimension
readonlydimension:string
Defined in: script-host/src/host/worldsystem/seam.ts:90
location
readonlylocation:ScriptVector3
Defined in: script-host/src/host/worldsystem/seam.ts:91
ScriptMusic
Defined in: script-host/src/host/worldsystem/seam.ts:17
A track world.playMusic or queueMusic starts for every player.
Properties
fade
readonlyfade:number
Defined in: script-host/src/host/worldsystem/seam.ts:21
Seconds the track fades in over.
loop
readonlyloop:boolean
Defined in: script-host/src/host/worldsystem/seam.ts:22
queue
readonlyqueue:boolean
Defined in: script-host/src/host/worldsystem/seam.ts:24
Whether it waits for the playing track to end, as queueMusic does.
track
readonlytrack:string
Defined in: script-host/src/host/worldsystem/seam.ts:18
volume
readonlyvolume:number
Defined in: script-host/src/host/worldsystem/seam.ts:19
ScriptTickingArea
Defined in: script-host/src/host/worldsystem/seam.ts:66
One of the scripts' ticking areas, as the world keeps it.
Properties
chunks
readonlychunks:ScriptChunkArea
Defined in: script-host/src/host/worldsystem/seam.ts:69
dimension
readonlydimension:string
Defined in: script-host/src/host/worldsystem/seam.ts:68
identifier
readonlyidentifier:string
Defined in: script-host/src/host/worldsystem/seam.ts:67
loaded
readonlyloaded:boolean
Defined in: script-host/src/host/worldsystem/seam.ts:71
Whether every chunk it covers is loaded.
ScriptTimeMarker
Defined in: script-host/src/host/worldsystem/seam.ts:75
A time marker a script added to the overworld's clock.
Properties
name
readonlyname:string
Defined in: script-host/src/host/worldsystem/seam.ts:76
period?
readonlyoptionalperiod?:number
Defined in: script-host/src/host/worldsystem/seam.ts:79
Ticks between two of its times; absent for a marker that comes once.
time
readonlytime:number
Defined in: script-host/src/host/worldsystem/seam.ts:77
ScriptWorldSystem
Defined in: script-host/src/host/worldsystem/seam.ts:95
The world and system state the world and system members of a world's scripts reach.
Methods
absoluteTime()
absoluteTime():
number
Defined in: script-host/src/host/worldsystem/seam.ts:97
The world's time in ticks since it began, which /time set writes and every dimension shares.
Returns
number
addTickingArea()
addTickingArea(
identifier,dimension,chunks):void
Defined in: script-host/src/host/worldsystem/seam.ts:147
Adds a ticking area over the chunks a block box covers, which starts them loading.
Parameters
identifier
string
dimension
string
chunks
Returns
void
addTimeMarker()
addTimeMarker(
marker):void
Defined in: script-host/src/host/worldsystem/seam.ts:167
Parameters
marker
Returns
void
allowCheats()
allowCheats():
boolean
Defined in: script-host/src/host/worldsystem/seam.ts:109
Returns
boolean
biome()
biome(
dimension,location):string|undefined
Defined in: script-host/src/host/worldsystem/seam.ts:122
The biome at a location, or undefined when its chunk is not loaded.
Parameters
dimension
string
location
Returns
string | undefined
biomes()
biomes(): readonly
ScriptBiome[]
Defined in: script-host/src/host/worldsystem/seam.ts:124
Every biome the world knows, with its tags.
Returns
readonly ScriptBiome[]
blockKind()
blockKind(
typeId):ScriptBlockKind
Defined in: script-host/src/host/worldsystem/seam.ts:118
What a block is to a search or a ray, by its type.
Parameters
typeId
string
Returns
blockTags()
blockTags(
typeId): readonlystring[]
Defined in: script-host/src/host/worldsystem/seam.ts:174
A block type's Bedrock tags, as a block filter's tags match them.
Parameters
typeId
string
Returns
readonly string[]
clockPaused()
clockPaused():
boolean
Defined in: script-host/src/host/worldsystem/seam.ts:163
Whether a script paused the overworld's clock.
Returns
boolean
defaultSpawn()
defaultSpawn():
ScriptVector3
Defined in: script-host/src/host/worldsystem/seam.ts:102
The world's spawn, in whole blocks.
Returns
difficulty()
difficulty():
ScriptDifficulty
Defined in: script-host/src/host/worldsystem/seam.ts:99
Returns
entityBox()
entityBox(
id): {max:ScriptVector3;min:ScriptVector3; } |undefined
Defined in: script-host/src/host/worldsystem/seam.ts:131
An entity's collision box, or undefined for one that is gone.
Parameters
id
string
Returns
{ max: ScriptVector3; min: ScriptVector3; } | undefined
explode()
explode(
dimension,location,explosion):void
Defined in: script-host/src/host/worldsystem/seam.ts:136
Parameters
dimension
string
location
explosion
Returns
void
findBiome()
findBiome(
dimension,biome,from):ScriptVector3|undefined
Defined in: script-host/src/host/worldsystem/seam.ts:129
The nearest location of a biome the world's generator would place, from its seed, or undefined when it places none within reach.
Parameters
dimension
string
biome
string
from
Returns
ScriptVector3 | undefined
fogStack()
fogStack(
player): readonlyScriptFogLayer[] |undefined
Defined in: script-host/src/host/worldsystem/seam.ts:170
A player's fog stack, bottom first, or undefined for a player who is gone.
Parameters
player
string
Returns
readonly ScriptFogLayer[] | undefined
gameRule()
gameRule(
name):ScriptGameRuleValue
Defined in: script-host/src/host/worldsystem/seam.ts:104
Parameters
name
"commandBlockOutput" | "commandBlocksEnabled" | "doDayLightCycle" | "doEntityDrops" | "doFireTick" | "doImmediateRespawn" | "doInsomnia" | "doLimitedCrafting" | "doMobLoot" | "doMobSpawning" | "doTileDrops" | "doWeatherCycle" | "drowningDamage" | "fallDamage" | "fireDamage" | "freezeDamage" | "functionCommandLimit" | "keepInventory" | "maxCommandChainLength" | "mobGriefing" | "naturalRegeneration" | "playerWaypoints" | "playersSleepingPercentage" | "projectilesCanBreakBlocks" | "pvp" | "randomTickSpeed" | "recipesUnlock" | "respawnBlocksExplode" | "sendCommandFeedback" | "showBorderEffect" | "showCoordinates" | "showDaysPlayed" | "showDeathMessages" | "showRecipeMessages" | "showTags" | "spawnRadius" | "tntExplodes" | "tntExplosionDropDecay"
Returns
generatedStructures()
generatedStructures(
dimension,location): readonlystring[]
Defined in: script-host/src/host/worldsystem/seam.ts:143
The structures generation laid out over a location, by their feature type, such as minecraft:village.
Parameters
dimension
string
location
Returns
readonly string[]
isHardcore()
isHardcore():
boolean
Defined in: script-host/src/host/worldsystem/seam.ts:106
Returns
boolean
light()
light(
dimension,location):ScriptLight|undefined
Defined in: script-host/src/host/worldsystem/seam.ts:120
The light at a block, or undefined when its chunk is not loaded.
Parameters
dimension
string
location
Returns
ScriptLight | undefined
lootTable()
lootTable(
path):unknown
Defined in: script-host/src/host/worldsystem/seam.ts:151
A behavior pack loot table's JSON, by its path such as loot_tables/entities/pig.json.
Parameters
path
string
Returns
unknown
placeFeature()
placeFeature(
dimension,name,location,rule):boolean|"unknown"
Defined in: script-host/src/host/worldsystem/seam.ts:141
Places a feature, or a feature rule's feature, at a location.
Parameters
dimension
string
name
string
location
rule
boolean
Returns
boolean | "unknown"
Whether it placed, or unknown for a name the world's packs do not define.
playMusic()
playMusic(
music):void
Defined in: script-host/src/host/worldsystem/seam.ts:111
Parameters
music
Returns
void
removeTickingArea()
removeTickingArea(
identifier):boolean
Defined in: script-host/src/host/worldsystem/seam.ts:149
Removes a ticking area, and returns whether there was one.
Parameters
identifier
string
Returns
boolean
removeTimeMarker()
removeTimeMarker(
name):void
Defined in: script-host/src/host/worldsystem/seam.ts:168
Parameters
name
string
Returns
void
rollBlockLoot()
rollBlockLoot(
permutation,tool?,place?): readonlyScriptItem[] |undefined
Defined in: script-host/src/host/worldsystem/seam.ts:155
What a block drops when broken with a tool, or undefined when the tool cannot harvest it.
Parameters
permutation
tool?
place?
Returns
readonly ScriptItem[] | undefined
rollEntityLoot()
rollEntityLoot(
typeId,tool?,place?): readonlyScriptItem[] |undefined
Defined in: script-host/src/host/worldsystem/seam.ts:161
What an entity of a type drops when it dies.
Parameters
typeId
string
tool?
place?
Returns
readonly ScriptItem[] | undefined
rollLootTable()
rollLootTable(
path,tool?): readonlyScriptItem[] |undefined
Defined in: script-host/src/host/worldsystem/seam.ts:153
Rolls a loot table by its path, or undefined for one the packs do not have.
Parameters
path
string
tool?
Returns
readonly ScriptItem[] | undefined
seed()
seed():
string
Defined in: script-host/src/host/worldsystem/seam.ts:108
The world's seed, as decimal digits.
Returns
string
setAbsoluteTime()
setAbsoluteTime(
time):void
Defined in: script-host/src/host/worldsystem/seam.ts:98
Parameters
time
number
Returns
void
setAllowCheats()
setAllowCheats(
allow):void
Defined in: script-host/src/host/worldsystem/seam.ts:110
Parameters
allow
boolean
Returns
void
setClockPaused()
setClockPaused(
paused):void
Defined in: script-host/src/host/worldsystem/seam.ts:164
Parameters
paused
boolean
Returns
void
setDefaultSpawn()
setDefaultSpawn(
location):void
Defined in: script-host/src/host/worldsystem/seam.ts:103
Parameters
location
Returns
void
setDifficulty()
setDifficulty(
difficulty):void
Defined in: script-host/src/host/worldsystem/seam.ts:100
Parameters
difficulty
Returns
void
setFogStack()
setFogStack(
player,layers):void
Defined in: script-host/src/host/worldsystem/seam.ts:172
Replaces a player's fog stack, which the player's client then draws.
Parameters
player
string
layers
readonly ScriptFogLayer[]
Returns
void
setGameRule()
setGameRule(
name,value):void
Defined in: script-host/src/host/worldsystem/seam.ts:105
Parameters
name
"commandBlockOutput" | "commandBlocksEnabled" | "doDayLightCycle" | "doEntityDrops" | "doFireTick" | "doImmediateRespawn" | "doInsomnia" | "doLimitedCrafting" | "doMobLoot" | "doMobSpawning" | "doTileDrops" | "doWeatherCycle" | "drowningDamage" | "fallDamage" | "fireDamage" | "freezeDamage" | "functionCommandLimit" | "keepInventory" | "maxCommandChainLength" | "mobGriefing" | "naturalRegeneration" | "playerWaypoints" | "playersSleepingPercentage" | "projectilesCanBreakBlocks" | "pvp" | "randomTickSpeed" | "recipesUnlock" | "respawnBlocksExplode" | "sendCommandFeedback" | "showBorderEffect" | "showCoordinates" | "showDaysPlayed" | "showDeathMessages" | "showRecipeMessages" | "showTags" | "spawnRadius" | "tntExplodes" | "tntExplosionDropDecay"
value
Returns
void
spawnItem()
spawnItem(
dimension,item,location):string|undefined
Defined in: script-host/src/host/worldsystem/seam.ts:133
Drops a stack as an item entity that lies still, and returns its id, or undefined when none was made.
Parameters
dimension
string
item
location
Returns
string | undefined
spawnXp()
spawnXp(
dimension,location,amount):void
Defined in: script-host/src/host/worldsystem/seam.ts:135
Drops experience orbs worth amount points.
Parameters
dimension
string
location
amount
number
Returns
void
stopMusic()
stopMusic():
void
Defined in: script-host/src/host/worldsystem/seam.ts:112
Returns
void
stopSound()
stopSound(
dimension,sound?):void
Defined in: script-host/src/host/worldsystem/seam.ts:116
Stops a sound for every player in a dimension, or every sound when sound is undefined.
Parameters
dimension
string
sound?
string
Returns
void
tickingAreas()
tickingAreas(): readonly
ScriptTickingArea[]
Defined in: script-host/src/host/worldsystem/seam.ts:145
The scripts' ticking areas, in the order they were added; the command's are not among them.
Returns
readonly ScriptTickingArea[]
timeMarkers()
timeMarkers(): readonly
ScriptTimeMarker[]
Defined in: script-host/src/host/worldsystem/seam.ts:166
The time markers scripts added to the overworld's clock, in the order they were added.
Returns
readonly ScriptTimeMarker[]
Type Aliases
ScriptBlockKind
ScriptBlockKind =
"air"|"liquid"|"passable"|"solid"
Defined in: script-host/src/host/worldsystem/seam.ts:31
What a block is to a search or a ray: nothing, a liquid, a block an entity walks through, such as short grass, or a block an entity stands on. Water and lava count as passable as well.
ScriptDifficulty
ScriptDifficulty =
"Easy"|"Hard"|"Normal"|"Peaceful"
Defined in: script-host/src/host/worldsystem/seam.ts:14
A world's difficulty, as Difficulty names it.