Class GeyserSpigot1_12WorldManager
java.lang.Object
org.geysermc.connector.network.translators.world.WorldManager
org.geysermc.connector.network.translators.world.GeyserWorldManager
org.geysermc.platform.spigot.world.manager.GeyserSpigotWorldManager
org.geysermc.platform.spigot.world.manager.GeyserSpigot1_12WorldManager
- Direct Known Subclasses:
GeyserSpigot1_12NativeWorldManager
Should be used when ViaVersion is present, no NMS adapter is being used, and we are pre-1.13.
You need ViaVersion to connect to an older server with the Geyser-Spigot plugin.
-
Field Summary
Fields inherited from class org.geysermc.platform.spigot.world.manager.GeyserSpigotWorldManager
CLIENT_PROTOCOL_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBlockAt(GeyserSession session, int x, int y, int z)intgetLegacyBlock(com.viaversion.viaversion.protocols.protocol1_13to1_12_2.storage.BlockStorage storage, int blockId, int x, int y, int z)booleanisLegacy()This must be set to true if we are pre-1.13, anddoes not exist.Methods inherited from class org.geysermc.platform.spigot.world.manager.GeyserSpigotWorldManager
getGameRuleBool, getGameRuleInt, getLecternDataAt, hasOwnChunkCache, hasPermission, shouldExpectLecternHandledMethods inherited from class org.geysermc.connector.network.translators.world.GeyserWorldManager
setDifficulty, setGameRule, setPlayerGameModeMethods inherited from class org.geysermc.connector.network.translators.world.WorldManager
getBlockAt, getBlockAt
-
Constructor Details
-
GeyserSpigot1_12WorldManager
public GeyserSpigot1_12WorldManager(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
getBlockAt
- Overrides:
getBlockAtin classGeyserSpigotWorldManager
-
getLegacyBlock
public int getLegacyBlock(com.viaversion.viaversion.protocols.protocol1_13to1_12_2.storage.BlockStorage storage, int blockId, int x, int y, int z)- Parameters:
storage- ViaVersion's block entity storage (used to fix block entity state differences)blockId- the pre-1.13 block idx- X coordinate of blocky- Y coordinate of blockz- Z coordinate of block- Returns:
- the block state updated to the latest Minecraft version
-
isLegacy
public boolean isLegacy()Description copied from class:GeyserSpigotWorldManagerThis 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:
isLegacyin classGeyserSpigotWorldManager- Returns:
- whether there is a difference between client block state and server block state that requires extra processing
-