Class GeyserSpigotFallbackWorldManager
java.lang.Object
org.geysermc.geyser.level.WorldManager
org.geysermc.geyser.level.GeyserWorldManager
org.geysermc.geyser.platform.spigot.world.manager.GeyserSpigotWorldManager
org.geysermc.geyser.platform.spigot.world.manager.GeyserSpigotFallbackWorldManager
Should only be used when we know
GeyserSpigotWorldManager.getBlockAt(GeyserSession, int, int, int)
cannot be accurate. Typically, this is when ViaVersion is not installed but a client still manages to connect.
If this occurs to you somehow, please let us know!!-
Field Summary
Fields inherited from class org.geysermc.geyser.platform.spigot.world.manager.GeyserSpigotWorldManager
CLIENT_PROTOCOL_VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getBlockAt(GeyserSession session, int x, int y, int z)
Gets the Java block state at the specified locationboolean
Checks whether or not this world manager requires a separate chunk cache/has access to more block data than the chunk cache.boolean
isLegacy()
This must be set to true if we are pre-1.13, anddoes not exist
.Methods inherited from class org.geysermc.geyser.platform.spigot.world.manager.GeyserSpigotWorldManager
getBlockNetworkId, getGameRuleBool, getGameRuleInt, getLecternDataAt, hasPermission, shouldExpectLecternHandled
Methods inherited from class org.geysermc.geyser.level.GeyserWorldManager
setDifficulty, setGameRule, setPlayerGameMode
Methods inherited from class org.geysermc.geyser.level.WorldManager
getBlockAt, getBlockAt
-
Constructor Details
-
GeyserSpigotFallbackWorldManager
public GeyserSpigotFallbackWorldManager(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
getBlockAt
Description copied from class:WorldManager
Gets the Java block state at the specified location- Overrides:
getBlockAt
in classGeyserSpigotWorldManager
- 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
-
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.
- Overrides:
hasOwnChunkCache
in classGeyserSpigotWorldManager
- Returns:
- whether or not this world manager has access to more block data than the chunk cache
-
isLegacy
public boolean isLegacy()Description copied from class:GeyserSpigotWorldManager
This must be set to true if we are pre-1.13, anddoes not exist
. This should be set to true if we are post-1.13 but before the latest version, and we should convert the old block state id to the current one.- Overrides:
isLegacy
in classGeyserSpigotWorldManager
- Returns:
- whether there is a difference between client block state and server block state that requires extra processing
-