Class EventNetworkChannel

java.lang.Object
net.minecraftforge.network.Channel<FriendlyByteBuf>
net.minecraftforge.network.EventNetworkChannel

public class EventNetworkChannel extends Channel<FriendlyByteBuf>
An event-bus like object on which CustomPayloadEvents are posted. These events are fired from the network thread, and so should not interact with most game state by default. CustomPayloadEvent.Context.enqueueWork(Runnable) can be used to handle the message on the main server or client thread.
See Also:
  • invalid reference
    ChannelBuilder#newEventChannel(ResourceLocation, Supplier, Predicate, Predicate)