Interface LimboFactory


public interface LimboFactory
  • Method Details

    • createSimpleBlock

      VirtualBlock createSimpleBlock(Block block)
      Creates new virtual block from Block enum.
      Parameters:
      block - Block from Block enum.
      Returns:
      new virtual block.
    • createSimpleBlock

      VirtualBlock createSimpleBlock(short legacyID)
      Creates new virtual block from id and data.
      Parameters:
      legacyID - Legacy block id. (1.12.2 and lower)
      Returns:
      new virtual block.
    • createSimpleBlock

      VirtualBlock createSimpleBlock(String modernID)
      Creates new virtual block from id and data.
      Parameters:
      modernID - Modern block id.
      Returns:
      new virtual block.
    • createSimpleBlock

      VirtualBlock createSimpleBlock(String modernID, Map<String,String> properties)
      Creates new virtual block from id and data.
      Parameters:
      modernID - Modern block id.
      properties - Modern properties like {"waterlogged": "true"}.
      Returns:
      new virtual block.
    • createSimpleBlock

      VirtualBlock createSimpleBlock(short legacyID, boolean modern)
      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

      VirtualBlock createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, short id)
      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 VirtualChunk createVirtualChunk(int posX, int posZ)
      Deprecated.
      Creates new virtual chunk with plain biomes set as default. You need to provide the chunk location, you can get it using blockCoordinate >> 4.
      Parameters:
      posX - Chunk location. (X)
      posZ - Chunk location. (Z)
      Returns:
      new virtual chunk.
    • createVirtualChunk

      VirtualChunk createVirtualChunk(int posX, int posZ, VirtualBiome defaultBiome)
      Creates new virtual chunk. You need to provide the chunk location, you can get it using blockCoordinate >> 4.
      Parameters:
      posX - Chunk location. (X)
      posZ - Chunk location. (Z)
      defaultBiome - Default biome to fill it.
      Returns:
      new virtual chunk.
    • createVirtualChunk

      VirtualChunk createVirtualChunk(int posX, int posZ, BuiltInBiome defaultBiome)
      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

      Limbo createLimbo(VirtualWorld world)
      Creates new virtual server.
      Parameters:
      world - Virtual world.
      Returns:
      new virtual server.
    • releasePreparedPacketThread

      void releasePreparedPacketThread(Thread thread)
      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

      VirtualItem getItem(Item item)
      Creates new virtual item from Item enum.
      Parameters:
      item - Item from item enum.
      Returns:
      new virtual item.
    • getItem

      VirtualItem getItem(String itemID)
      Creates new virtual item from Item enum.
      Parameters:
      itemID - Modern item identifier.
      Returns:
      new virtual item.
    • getLegacyItem

      VirtualItem getLegacyItem(int itemLegacyID)
      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

      VirtualBlockEntity getBlockEntity(String entityID)
    • 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

      WorldFile openWorldFile(BuiltInWorldFileType apiType, Path file) throws IOException
      Opens world file (a.k.a. schematic file)
      Parameters:
      apiType - World file type
      file - World file
      Returns:
      Ready to use WorldFile
      Throws:
      IOException
    • openWorldFile

      WorldFile openWorldFile(BuiltInWorldFileType apiType, InputStream stream) throws IOException
      Opens world file (a.k.a. schematic file)
      Parameters:
      apiType - World file type
      stream - 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 type
      tag - World file NBT tag
      Returns:
      Ready to use WorldFile