Package eu.sculkpowered.server.world
Interface World
public interface World
Represents a world.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classRepresents a world builder. -
Method Summary
Modifier and TypeMethodDescription@NotNull BlockStateblock(int x, int y, int z) Gets the block at the specified coordinates.voidblock(int x, int y, int z, @NotNull BlockState block) Sets the specified block at the specified coordinates.default @NotNull BlockStateGets the block at the specified position.default voidblock(@NotNull Position position, @NotNull BlockState block) Sets the specified block at the specified coordinates.static World.Builderbuilder()Creates a new world builder.@NotNull Chunkchunk(int chunkX, int chunkZ) Gets the chunk at the specified chunk coordinates.@NotNull ChunkchunkAt(int x, int z) Gets the chunk at the specified coordinates.@NotNull ChunkGets the chunk at the specified position.@NotNull GameModeGets the default game mode of the world.@NotNull DimensionGets the dimension of the world.@NotNull CompoundBinaryTagGets the extra world data.voidextraData(@NotNull CompoundBinaryTag data) Sets the extra data.@NotNull ChunkGeneratorGets the chunk generator of the world.booleanisAlive()Checks if the world is alive.@NotNull Stringname()Gets the name of the world.voidsave(@NotNull WorldSaver saver) Saves a world.voidspawnEntity(@NotNull Entity entity, @NotNull Position position) Spawns the specified entity at the specified position in this world.@NotNull PositionGets the spawn position of the world.
-
Method Details
-
name
Gets the name of the world.- Returns:
- the world's name
- Since:
- 1.0.0
-
dimension
Gets the dimension of the world.- Returns:
- the world's dimension
- Since:
- 1.0.0
-
generator
Gets the chunk generator of the world.- Returns:
- the world's chunk generator
- Since:
- 1.0.0
-
spawnPosition
Gets the spawn position of the world.- Returns:
- the world's spawn position
- Since:
- 1.0.0
-
defaultGameMode
Gets the default game mode of the world.- Returns:
- the world's default game mode
- Since:
- 1.0.0
-
block
Sets the specified block at the specified coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinateblock- the block to set- Since:
- 1.0.0
-
block
Sets the specified block at the specified coordinates.- Parameters:
position- the positionblock- the block to set- Since:
- 1.0.0
-
block
Gets the block at the specified coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate- Returns:
- the block at the specified coordinates
- Since:
- 1.0.0
-
block
Gets the block at the specified position.- Parameters:
position- the position of the block- Returns:
- the block at the specified position
- Since:
- 1.0.0
-
chunk
Gets the chunk at the specified chunk coordinates.- Parameters:
chunkX- the chunk x coordinatechunkZ- the chunk z coordinate- Returns:
- the chunk at the specified chunk coordinates
- Since:
- 1.0.0
-
chunkAt
Gets the chunk at the specified coordinates.- Parameters:
x- the x coordinatez- the z coordinate- Returns:
- the chunk at the specified coordinates
- Since:
- 1.0.0
-
chunkAt
Gets the chunk at the specified position.- Parameters:
position- the position- Returns:
- the chunk at the specified position
- Since:
- 1.0.0
-
spawnEntity
Spawns the specified entity at the specified position in this world.- Parameters:
entity- the entity to spawnposition- the position- Since:
- 1.0.0
-
extraData
Gets the extra world data. In the anvil folder it is the level dat file.- Since:
- 1.0.0
-
extraData
Sets the extra data.- Parameters:
data- the data in a compound binary tag- Since:
- 1.0.0
-
isAlive
boolean isAlive()Checks if the world is alive.- Returns:
- whether the world is alive
- Since:
- 1.0.0
-
save
Saves a world.- Since:
- 1.0.0
-
builder
Creates a new world builder.- Returns:
- a new builder instance.
- Since:
- 1.0.0
-