Class NetworkUtils

java.lang.Object
org.cloudburstmc.server.network.NetworkUtils

public class NetworkUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.nukkitx.protocol.bedrock.data.AttributeData
    attributeToNetwork​(org.cloudburstmc.api.entity.Attribute attr)
     
    static org.cloudburstmc.api.potion.EffectType
    effectFromLegacy​(byte effectId)
     
    static byte
    effectToNetwork​(org.cloudburstmc.api.potion.EffectType type)
     
    static void
    gameRulesToNetwork​(org.cloudburstmc.api.level.gamerule.GameRuleMap gameRules, List<com.nukkitx.protocol.bedrock.data.GameRuleData<?>> networkRules)
     
    static com.nukkitx.protocol.bedrock.data.inventory.ContainerType
    inventoryToNetwork​(org.cloudburstmc.api.inventory.InventoryType type)
     
    itemStackFromNetwork​(com.nukkitx.protocol.bedrock.data.inventory.ItemData data)
     
    static com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.ItemEntry
    itemStackToNetwork​(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData data, BaseInventory inv)
     
    static org.cloudburstmc.api.potion.PotionType
    potionFromLegacy​(short potionId)
     
    static short
    potionToNetwork​(org.cloudburstmc.api.potion.PotionType type)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NetworkUtils

      public NetworkUtils()
  • Method Details

    • attributeToNetwork

      public static com.nukkitx.protocol.bedrock.data.AttributeData attributeToNetwork(org.cloudburstmc.api.entity.Attribute attr)
    • gameRulesToNetwork

      public static void gameRulesToNetwork(org.cloudburstmc.api.level.gamerule.GameRuleMap gameRules, List<com.nukkitx.protocol.bedrock.data.GameRuleData<?>> networkRules)
    • potionToNetwork

      public static short potionToNetwork(org.cloudburstmc.api.potion.PotionType type)
    • potionFromLegacy

      public static org.cloudburstmc.api.potion.PotionType potionFromLegacy(short potionId)
    • effectToNetwork

      public static byte effectToNetwork(org.cloudburstmc.api.potion.EffectType type)
    • effectFromLegacy

      public static org.cloudburstmc.api.potion.EffectType effectFromLegacy(byte effectId)
    • inventoryToNetwork

      public static com.nukkitx.protocol.bedrock.data.inventory.ContainerType inventoryToNetwork(org.cloudburstmc.api.inventory.InventoryType type)
    • itemStackToNetwork

      public static com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.ItemEntry itemStackToNetwork(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData data, BaseInventory inv)
    • itemStackFromNetwork

      public static CloudItemStack itemStackFromNetwork(com.nukkitx.protocol.bedrock.data.inventory.ItemData data)