Skip to content
Flint
Dokumentation

world

typePaper

A world (dimension).

Egenskaber 9

world.name: text
skrivebeskyttetPaper

Name of the world.

world.players: list
skrivebeskyttetPaper

Players in this world.

world.time: number
kan ændresPaper

Time of day in ticks (0 to 24000).

world.storming: bool
kan ændresPaper

Whether it is raining.

world.spawn: location
kan ændresPaper

Spawn location. Assign a location to move it.

world.entities: list
skrivebeskyttetPaper

Every loaded entity in the world.

world.seed: text
skrivebeskyttetPaper

The world seed.

world.difficulty: text
kan ændresPaper

peaceful, easy, normal or hard.

world.pvp: bool
kan ændresPaper

Whether players can hurt each other.

Metoder 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.