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 class
NetworkEvent.ChannelRegistrationChangeEvent
Fired when the channel registration (see minecraft custom channel documentation) changes.static class
NetworkEvent.ClientCustomPayloadEvent
static class
NetworkEvent.ClientCustomPayloadLoginEvent
static class
NetworkEvent.Context
Context forNetworkEvent
static class
NetworkEvent.GatherLoginPayloadsEvent
static class
NetworkEvent.LoginPayloadEvent
static class
NetworkEvent.RegistrationChangeType
static class
NetworkEvent.ServerCustomPayloadEvent
static class
NetworkEvent.ServerCustomPayloadLoginEvent
-
Field Summary
Fields Modifier and Type Field Description private int
loginIndex
private PacketBuffer
payload
private java.util.function.Supplier<NetworkEvent.Context>
source
-
Constructor Summary
Constructors Modifier Constructor Description NetworkEvent(java.util.function.Supplier<NetworkEvent.Context> source)
private
NetworkEvent(PacketBuffer payload, java.util.function.Supplier<NetworkEvent.Context> source, int loginIndex)
private
NetworkEvent(ICustomPacket<?> payload, java.util.function.Supplier<NetworkEvent.Context> source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLoginIndex()
PacketBuffer
getPayload()
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()
-
-