Class GeyserWorldManager

java.lang.Object
org.geysermc.geyser.level.WorldManager
org.geysermc.geyser.level.GeyserWorldManager

public class GeyserWorldManager extends WorldManager
  • Constructor Details

    • GeyserWorldManager

      public GeyserWorldManager()
  • Method Details

    • getBlockAt

      public int getBlockAt(GeyserSession session, int x, int y, int z)
      Description copied from class: WorldManager
      Gets the Java block state at the specified location
      Specified by:
      getBlockAt in class WorldManager
      Parameters:
      session - the session
      x - the x coordinate to get the block at
      y - the y coordinate to get the block at
      z - the z coordinate to get the block at
      Returns:
      the block state at the specified location
    • getBlockAtAsync

      public CompletableFuture<Integer> getBlockAtAsync(GeyserSession session, int x, int y, int z)
      Overrides:
      getBlockAtAsync in class WorldManager
    • getBlocksAt

      public int[] getBlocksAt(GeyserSession session, org.geysermc.erosion.util.BlockPositionIterator iter)
      Overrides:
      getBlocksAt in class WorldManager
    • hasOwnChunkCache

      public boolean hasOwnChunkCache()
      Description copied from class: WorldManager
      Checks whether or not this world manager requires a separate chunk cache/has access to more block data than the chunk cache.

      Some world managers (e.g. Spigot) can provide access to block data outside of the chunk cache, and even with chunk caching disabled. This method provides a means to check if this manager has this capability.

      Specified by:
      hasOwnChunkCache in class WorldManager
      Returns:
      whether or not this world manager has access to more block data than the chunk cache
    • getDefaultGameMode

      public org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode getDefaultGameMode(GeyserSession session)
      Description copied from class: WorldManager
      Get the default game mode of the server
      Specified by:
      getDefaultGameMode in class WorldManager
      Parameters:
      session - the player requesting the default game mode
      Returns:
      the default game mode of the server, or Survival if unknown.