Package org.geysermc.geyser.level
Class GeyserWorldManager
java.lang.Object
org.geysermc.geyser.level.WorldManager
org.geysermc.geyser.level.GeyserWorldManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBlockAt(GeyserSession session, int x, int y, int z) Gets the Java block state at the specified locationgetBlockAtAsync(GeyserSession session, int x, int y, int z) int[]getBlocksAt(GeyserSession session, org.geysermc.erosion.util.BlockPositionIterator iter) org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameModegetDefaultGameMode(GeyserSession session) Get the default game mode of the serverbooleanChecks whether or not this world manager requires a separate chunk cache/has access to more block data than the chunk cache.Methods inherited from class org.geysermc.geyser.level.WorldManager
blockAt, blockAt, getBiomeIdentifiers, getBlockAt, getBlockAtAsync, getDecoratedPotData, setDefaultGameMode, setDifficulty
-
Constructor Details
-
GeyserWorldManager
public GeyserWorldManager()
-
-
Method Details
-
getBlockAt
Description copied from class:WorldManagerGets the Java block state at the specified location- Specified by:
getBlockAtin classWorldManager- Parameters:
session- the sessionx- the x coordinate to get the block aty- the y coordinate to get the block atz- the z coordinate to get the block at- Returns:
- the block state at the specified location
-
getBlockAtAsync
- Overrides:
getBlockAtAsyncin classWorldManager
-
getBlocksAt
public int[] getBlocksAt(GeyserSession session, org.geysermc.erosion.util.BlockPositionIterator iter) - Overrides:
getBlocksAtin classWorldManager
-
hasOwnChunkCache
public boolean hasOwnChunkCache()Description copied from class:WorldManagerChecks 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:
hasOwnChunkCachein classWorldManager- 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:WorldManagerGet the default game mode of the server- Specified by:
getDefaultGameModein classWorldManager- Parameters:
session- the player requesting the default game mode- Returns:
- the default game mode of the server, or Survival if unknown.
-