Skip to content

API reference / @jsprismarine/prismarine / world/lootLevel

world/lootLevel ​

Interfaces ​

LootLevelWorld ​

Defined in: packages/prismarine/src/world/lootLevel.ts:27

The little of a world lootLevelOf reads, so a test satisfies it without building one.

Methods ​

createMap()? ​

optional createMap(map): number

Defined in: packages/prismarine/src/world/lootLevel.ts:40

Makes a map and answers its id; see World.createMap.

Parameters ​
map ​

NewMap

Returns ​

number

getDimension() ​

getDimension(): object

Defined in: packages/prismarine/src/world/lootLevel.ts:31

The dimension this world is, by the identifier a location_check compares.

Returns ​

object

name ​

readonly name: string

getTicks() ​

getTicks(): number

Defined in: packages/prismarine/src/world/lootLevel.ts:29

Ticks since the world started, which is the clock a time_check period is applied to.

Returns ​

number

locateStructure()? ​

optional locateStructure(name, origin, radius, options): Vec3 | undefined

Defined in: packages/prismarine/src/world/lootLevel.ts:33

The search /locate structure runs; see World.locateStructure.

Parameters ​
name ​

string

origin ​
x ​

number

y? ​

number

z ​

number

radius ​

number

options ​
skipKnownStructures ​

boolean

Returns ​

Vec3 | undefined

Functions ​

lootLevelOf() ​

lootLevelOf(world): LevelView

Defined in: packages/prismarine/src/world/lootLevel.ts:50

The level view for one world.

Parameters ​

world ​

LootLevelWorld

The world the roll happens in.

Returns ​

LevelView

The view, reading through to the world on every call rather than snapshotting it, because a roll may happen ticks after the view is made.