类 NetworkHandler

java.lang.Object
top.r3944realms.superleadrope.network.NetworkHandler

public class NetworkHandler extends Object
The type Network handler.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final net.minecraftforge.network.simple.SimpleChannel
    The constant INSTANCE.
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
    Register.
    static <MSG> void
    sendToAllPlayer(MSG message)
    Send to all player.
    static <MSG> void
    sendToPlayer(MSG message, net.minecraft.server.level.ServerPlayer player)
    Send to player.
    static <MSG, T> void
    sendToPlayer(MSG message, T entity, net.minecraftforge.network.PacketDistributor<T> packetDistributor)
    Send to player.

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • INSTANCE

      public static final net.minecraftforge.network.simple.SimpleChannel INSTANCE
      The constant INSTANCE.
  • 构造器详细资料

    • NetworkHandler

      public NetworkHandler()
  • 方法详细资料

    • register

      public static void register()
      Register.
    • sendToPlayer

      public static <MSG> void sendToPlayer(MSG message, net.minecraft.server.level.ServerPlayer player)
      Send to player.
      类型参数:
      MSG - the type parameter
      参数:
      message - the message
      player - the player
    • sendToAllPlayer

      public static <MSG> void sendToAllPlayer(MSG message)
      Send to all player.
      类型参数:
      MSG - the type parameter
      参数:
      message - the message
    • sendToPlayer

      public static <MSG, T> void sendToPlayer(MSG message, T entity, net.minecraftforge.network.PacketDistributor<T> packetDistributor)
      Send to player.
      类型参数:
      MSG - the type parameter
      T - the type parameter
      参数:
      message - the message
      entity - the entity
      packetDistributor - the packet distributor