Skip to content
Flint
Documentation

world

typePaper

A world (dimension).

Properties 9

world.name: text
read-onlyPaper

Name of the world.

world.players: list
read-onlyPaper

Players in this world.

world.time: number
settablePaper

Time of day in ticks (0 to 24000).

Whether it is raining.

Spawn location. Assign a location to move it.

world.entities: list
read-onlyPaper

Every loaded entity in the world.

world.seed: text
read-onlyPaper

The world seed.

peaceful, easy, normal or hard.

world.pvp: bool
settablePaper

Whether players can hurt each other.

Methods 10

The highest solid block at the coordinates.

Every block in the box between two corners (at most 100000).

Reads a game rule, or sets it when a value is given: world.gamerule("keepInventory", true).

The block at the coordinates.

A location in this world.

Shows particles, e.g. world.particle("flame", player.location, 20, 0.5).

Plays a sound everyone nearby can hear.

Strikes lightning. Harmless (the default) is only the effect.

Creates an explosion (TNT is power 4). Blocks are safe unless break_blocks is true.

Drops an item on the ground and returns the item entity.