Package net.elytrium.limboapi.api
Interface LimboFactory
public interface LimboFactory
-
Method Summary
Modifier and TypeMethodDescriptionCreates new prepared packet builder for the CONFIG state.createConfigPreparedPacket(com.velocitypowered.api.network.ProtocolVersion minVersion, com.velocitypowered.api.network.ProtocolVersion maxVersion) Creates new prepared packet builder for the CONFIG state.Creates new item component map.createLimbo(VirtualWorld world) Creates new virtual server.Creates new prepared packet builder.createPreparedPacket(com.velocitypowered.api.network.ProtocolVersion minVersion, com.velocitypowered.api.network.ProtocolVersion maxVersion) Creates new prepared packet builder.createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, short id) Creates new virtual customizable block.createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, Map<String, String> properties) Creates new virtual customizable block.createSimpleBlock(short legacyID) Creates new virtual block from id and data.createSimpleBlock(short legacyID, boolean modern) Creates new virtual block from id and data.createSimpleBlock(String modernID) Creates new virtual block from id and data.createSimpleBlock(String modernID, Map<String, String> properties) Creates new virtual block from id and data.createSimpleBlock(Block block) Creates new virtual block from Block enum.createVirtualChunk(int posX, int posZ) Deprecated.createVirtualChunk(int posX, int posZ, BuiltInBiome defaultBiome) Creates new virtual chunk.createVirtualChunk(int posX, int posZ, VirtualBiome defaultBiome) Creates new virtual chunk.createVirtualWorld(Dimension dimension, double posX, double posY, double posZ, float yaw, float pitch) Creates new virtual world.getBlockEntity(String entityID) Creates new virtual item from Item enum.Creates new virtual item from Item enum.getLegacyItem(int itemLegacyID) Creates new virtual item from Item enum.A factory to instantiate Minecraft packet objects.com.velocitypowered.api.network.ProtocolVersioncom.velocitypowered.api.network.ProtocolVersionopenWorldFile(BuiltInWorldFileType apiType, InputStream stream) Opens world file (a.k.a.openWorldFile(BuiltInWorldFileType apiType, Path file) Opens world file (a.k.a.openWorldFile(BuiltInWorldFileType apiType, net.kyori.adventure.nbt.CompoundBinaryTag tag) Opens world file (a.k.a.voidpassLoginLimbo(com.velocitypowered.api.proxy.Player player) Pass the player to the next Login Limbo, without spawning at current Limbo.voidreleasePreparedPacketThread(Thread thread) Releases a thread after PreparedPacket#build executions.
-
Method Details
-
createSimpleBlock
Creates new virtual block from Block enum.- Parameters:
block- Block from Block enum.- Returns:
- new virtual block.
-
createSimpleBlock
Creates new virtual block from id and data.- Parameters:
legacyID- Legacy block id. (1.12.2 and lower)- Returns:
- new virtual block.
-
createSimpleBlock
Creates new virtual block from id and data.- Parameters:
modernID- Modern block id.- Returns:
- new virtual block.
-
createSimpleBlock
Creates new virtual block from id and data.- Parameters:
modernID- Modern block id.properties- Modern properties like {"waterlogged": "true"}.- Returns:
- new virtual block.
-
createSimpleBlock
Creates new virtual block from id and data.- Parameters:
legacyID- Block id.modern- Use the latest supported version ids or 1.12.2 and lower.- Returns:
- new virtual block.
-
createSimpleBlock
Creates new virtual customizable block.- Parameters:
solid- Defines if the block is solid or not.air- Defines if the block is the air.motionBlocking- Defines if the block blocks motions. (1.14+)id- Block protocol id.- Returns:
- new virtual block.
-
createSimpleBlock
VirtualBlock createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, Map<String, String> properties) Creates new virtual customizable block.- Parameters:
solid- Defines if the block is solid or not.air- Defines if the block is the air.motionBlocking- Defines if the block blocks motions. (1.14+)modernID- Block id.properties- Modern properties like {"waterlogged": "true"}.- Returns:
- new virtual block.
-
createVirtualWorld
VirtualWorld createVirtualWorld(Dimension dimension, double posX, double posY, double posZ, float yaw, float pitch) Creates new virtual world.- Parameters:
dimension- World dimension.posX- Spawn location. (X)posY- Spawn location. (Y)posZ- Spawn location. (Z)yaw- Spawn rotation. (Yaw)pitch- Spawn rotation. (Pitch)- Returns:
- new virtual world.
-
createVirtualChunk
Deprecated.Creates new virtual chunk with plain biomes set as default. You need to provide the chunk location, you can get it usingblockCoordinate >> 4.- Parameters:
posX- Chunk location. (X)posZ- Chunk location. (Z)- Returns:
- new virtual chunk.
-
createVirtualChunk
Creates new virtual chunk. You need to provide the chunk location, you can get it usingblockCoordinate >> 4.- Parameters:
posX- Chunk location. (X)posZ- Chunk location. (Z)defaultBiome- Default biome to fill it.- Returns:
- new virtual chunk.
-
createVirtualChunk
Creates new virtual chunk. You need to provide the chunk location, you can get it using (block_coordinate >> 4)- Parameters:
posX- Chunk location. (X)posZ- Chunk location. (Z)defaultBiome- Default biome to fill it.- Returns:
- new virtual chunk.
-
createLimbo
Creates new virtual server.- Parameters:
world- Virtual world.- Returns:
- new virtual server.
-
releasePreparedPacketThread
Releases a thread after PreparedPacket#build executions. Used to free compression libraries. -
createPreparedPacket
PreparedPacket createPreparedPacket()Creates new prepared packet builder.- Returns:
- new prepared packet.
-
createPreparedPacket
PreparedPacket createPreparedPacket(com.velocitypowered.api.network.ProtocolVersion minVersion, com.velocitypowered.api.network.ProtocolVersion maxVersion) Creates new prepared packet builder.- Parameters:
minVersion- Minimum version to prepare.maxVersion- Maximum version to prepare.- Returns:
- new prepared packet.
-
createConfigPreparedPacket
PreparedPacket createConfigPreparedPacket()Creates new prepared packet builder for the CONFIG state.- Returns:
- new prepared packet.
-
createConfigPreparedPacket
PreparedPacket createConfigPreparedPacket(com.velocitypowered.api.network.ProtocolVersion minVersion, com.velocitypowered.api.network.ProtocolVersion maxVersion) Creates new prepared packet builder for the CONFIG state.- Parameters:
minVersion- Minimum version to prepare.maxVersion- Maximum version to prepare.- Returns:
- new prepared packet.
-
passLoginLimbo
void passLoginLimbo(com.velocitypowered.api.proxy.Player player) Pass the player to the next Login Limbo, without spawning at current Limbo.- Parameters:
player- Player to pass.
-
getItem
Creates new virtual item from Item enum.- Parameters:
item- Item from item enum.- Returns:
- new virtual item.
-
getItem
Creates new virtual item from Item enum.- Parameters:
itemID- Modern item identifier.- Returns:
- new virtual item.
-
getLegacyItem
Creates new virtual item from Item enum.- Parameters:
itemLegacyID- Legacy item ID- Returns:
- new virtual item.
-
createItemComponentMap
ItemComponentMap createItemComponentMap()Creates new item component map.- Returns:
- new item component map
-
getBlockEntity
-
getPacketFactory
PacketFactory getPacketFactory()A factory to instantiate Minecraft packet objects. -
getPrepareMinVersion
com.velocitypowered.api.network.ProtocolVersion getPrepareMinVersion() -
getPrepareMaxVersion
com.velocitypowered.api.network.ProtocolVersion getPrepareMaxVersion() -
openWorldFile
Opens world file (a.k.a. schematic file)- Parameters:
apiType- World file typefile- World file- Returns:
- Ready to use WorldFile
- Throws:
IOException
-
openWorldFile
Opens world file (a.k.a. schematic file)- Parameters:
apiType- World file typestream- World file stream- Returns:
- Ready to use WorldFile
- Throws:
IOException
-
openWorldFile
WorldFile openWorldFile(BuiltInWorldFileType apiType, net.kyori.adventure.nbt.CompoundBinaryTag tag) Opens world file (a.k.a. schematic file)- Parameters:
apiType- World file typetag- World file NBT tag- Returns:
- Ready to use WorldFile
-