Package net.minecraftforge.fml.network
Class NetworkEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.fml.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 Classes Modifier and Type Class Description static classNetworkEvent.ChannelRegistrationChangeEventFired when the channel registration (see minecraft custom channel documentation) changes.static classNetworkEvent.ClientCustomPayloadEventstatic classNetworkEvent.ClientCustomPayloadLoginEventstatic classNetworkEvent.ContextContext forNetworkEventstatic classNetworkEvent.GatherLoginPayloadsEventstatic classNetworkEvent.LoginPayloadEventstatic classNetworkEvent.RegistrationChangeTypestatic classNetworkEvent.ServerCustomPayloadEventstatic classNetworkEvent.ServerCustomPayloadLoginEvent
-
Field Summary
Fields Modifier and Type Field Description private intloginIndexprivate PacketBufferpayloadprivate java.util.function.Supplier<NetworkEvent.Context>source
-
Constructor Summary
Constructors Modifier Constructor Description NetworkEvent(java.util.function.Supplier<NetworkEvent.Context> source)privateNetworkEvent(PacketBuffer payload, java.util.function.Supplier<NetworkEvent.Context> source, int loginIndex)privateNetworkEvent(ICustomPacket<?> payload, java.util.function.Supplier<NetworkEvent.Context> source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLoginIndex()PacketBuffergetPayload()java.util.function.Supplier<NetworkEvent.Context>getSource()
-
-
-
Field Detail
-
payload
private final PacketBuffer payload
-
source
private final java.util.function.Supplier<NetworkEvent.Context> source
-
loginIndex
private final int loginIndex
-
-
Constructor Detail
-
NetworkEvent
private NetworkEvent(ICustomPacket<?> payload, java.util.function.Supplier<NetworkEvent.Context> source)
-
NetworkEvent
private NetworkEvent(PacketBuffer payload, java.util.function.Supplier<NetworkEvent.Context> source, int loginIndex)
-
NetworkEvent
public NetworkEvent(java.util.function.Supplier<NetworkEvent.Context> source)
-
-
Method Detail
-
getPayload
public PacketBuffer getPayload()
-
getSource
public java.util.function.Supplier<NetworkEvent.Context> getSource()
-
getLoginIndex
public int getLoginIndex()
-
-