Interface World

All Superinterfaces:
Audience, ForwardingAudience, Keyed, Pointered

public interface World extends Keyed, ForwardingAudience
  • Method Details

    • minY

      int minY()
    • height

      int height()
    • dimensionType

      DimensionTypeDefinition dimensionType()
      Returns this world's dimension type.
      Returns:
      this world's dimension type
      Since:
      0.1.0
    • dayNightCycle

      DayNightCycle dayNightCycle()
    • scheduler

      RegionizedScheduler scheduler()
      Returns the scheduler responsible for running tasks against positions in this world.
      Returns:
      the scheduler responsible for running tasks against positions in this world
      Since:
      0.1.0
    • getChunkAsync

      CompletableFuture<Chunk> getChunkAsync(int chunkX, int chunkZ)
    • getChunkAsync

      default CompletableFuture<Chunk> getChunkAsync(ChunkPos pos)
    • getChunkIfLoaded

      Optional<Chunk> getChunkIfLoaded(int chunkX, int chunkZ)
    • getChunkIfLoaded

      default Chunk getChunkIfLoaded(ChunkPos pos)
    • isChunkForceLoaded

      boolean isChunkForceLoaded(int chunkX, int chunkZ)
      Whether a chunk is force-loaded.
      Parameters:
      chunkX - the chunk X coordinate
      chunkZ - the chunk Z coordinate
      Returns:
      true if the chunk is force-loaded
      Since:
      0.1.0
    • isChunkForceLoaded

      default boolean isChunkForceLoaded(ChunkPos pos)
      Whether a chunk is force-loaded.
      Parameters:
      pos - the chunk position
      Returns:
      true if the chunk is force-loaded
      Since:
      0.1.0
      See Also:
    • forceLoadedChunks

      Set<ChunkPos> forceLoadedChunks()
      Returns an immutable snapshot of the force-loaded chunks of this world.
      Returns:
      an immutable snapshot of the force-loaded chunks of this world
      Since:
      0.1.0
    • isChunkLoaded

      default boolean isChunkLoaded(int chunkX, int chunkZ)
    • blockKeyAt

      Optional<Key> blockKeyAt(BlockPos pos)
    • getBlockStateId

      int getBlockStateId(BlockPos pos)
    • setBlockStateId

      boolean setBlockStateId(BlockPos pos, int stateId)
    • blockLight

      int blockLight(BlockPos pos)
    • skyLight

      int skyLight(BlockPos pos)
    • lightLevel

      int lightLevel(BlockPos pos)
    • entities

      Collection<? extends Entity> entities()
    • entity

      Entity entity(UUID uuid)
    • entity

      Entity entity(int entityId)
    • setChunkForceLoaded

      boolean setChunkForceLoaded(int chunkX, int chunkZ, boolean forced)
      Sets the force-loaded state of a chunk.
      Parameters:
      chunkX - the chunk X coordinate
      chunkZ - the chunk Z coordinate
      forced - whether to force-load or unforce-load the chunk
      Returns:
      true forces the chunk to remain loaded, false removes the loaded chunk
      Since:
      0.1.0
    • unloadChunkAsync

      CompletableFuture<Boolean> unloadChunkAsync(int chunkX, int chunkZ)
    • unloadChunkAsync

      default CompletableFuture<Boolean> unloadChunkAsync(ChunkPos pos)