Package net.minecraftforge.network
Class NetworkEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.network.NetworkEvent
- Direct Known Subclasses:
NetworkEvent.ChannelRegistrationChangeEvent,NetworkEvent.ClientCustomPayloadEvent,NetworkEvent.LoginPayloadEvent,NetworkEvent.ServerCustomPayloadEvent
public class NetworkEvent
extends net.minecraftforge.eventbus.api.Event
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired when the channel registration (see minecraft custom channel documentation) changes.static classstatic classstatic classContext forNetworkEventstatic classstatic classstatic classDispatcher for sending packets in response to a received packet.static enumstatic classstatic classNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final FriendlyByteBufprivate final Supplier<NetworkEvent.Context> -
Constructor Summary
ConstructorsModifierConstructorDescriptionNetworkEvent(Supplier<NetworkEvent.Context> source) privateNetworkEvent(FriendlyByteBuf payload, Supplier<NetworkEvent.Context> source, int loginIndex) privateNetworkEvent(ICustomPacket<?> payload, Supplier<NetworkEvent.Context> source) -
Method Summary
Modifier and TypeMethodDescriptionintMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
payload
-
source
-
loginIndex
private final int loginIndex
-
-
Constructor Details
-
NetworkEvent
-
NetworkEvent
private NetworkEvent(FriendlyByteBuf payload, Supplier<NetworkEvent.Context> source, int loginIndex) -
NetworkEvent
-
-
Method Details
-
getPayload
-
getSource
-
getLoginIndex
public int getLoginIndex()
-