Package org.cloudburstmc.server.network
Class NetworkUtils
java.lang.Object
org.cloudburstmc.server.network.NetworkUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.nukkitx.protocol.bedrock.data.AttributeDataattributeToNetwork(org.cloudburstmc.api.entity.Attribute attr)static org.cloudburstmc.api.potion.EffectTypeeffectFromLegacy(byte effectId)static byteeffectToNetwork(org.cloudburstmc.api.potion.EffectType type)static voidgameRulesToNetwork(org.cloudburstmc.api.level.gamerule.GameRuleMap gameRules, List<com.nukkitx.protocol.bedrock.data.GameRuleData<?>> networkRules)static com.nukkitx.protocol.bedrock.data.inventory.ContainerTypeinventoryToNetwork(org.cloudburstmc.api.inventory.InventoryType type)static CloudItemStackitemStackFromNetwork(com.nukkitx.protocol.bedrock.data.inventory.ItemData data)static com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.ItemEntryitemStackToNetwork(com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData data, BaseInventory inv)static org.cloudburstmc.api.potion.PotionTypepotionFromLegacy(short potionId)static shortpotionToNetwork(org.cloudburstmc.api.potion.PotionType type)
-
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)
-