Class NetworkBuilder<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>

java.lang.Object
net.tearpelato.craftcorelib.api.network.NetworkBuilder<T>

public final class NetworkBuilder<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> extends Object
  • Field Details

    • NETWORK_VERSION

      public static String NETWORK_VERSION
  • Method Details

    • flush

      public static void flush(NetworkRegistrar registrar)
    • create

      public static <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> NetworkBuilder<T> create(net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> type, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,T> codec)
    • setNetworkVersion

      public static void setNetworkVersion(String version)
    • handleServer

      public NetworkBuilder<T> handleServer(PayloadHandler<T> handler)
    • handleClient

      public NetworkBuilder<T> handleClient(PayloadHandler<T> handler)
    • direction

      public NetworkBuilder<T> direction(NetworkDirection direction)
    • register

      public void register()