Package net.minecraftforge.network
Class NetworkEvent.PacketDispatcher
java.lang.Object
net.minecraftforge.network.NetworkEvent.PacketDispatcher
- Direct Known Subclasses:
NetworkEvent.PacketDispatcher.NetworkManagerDispatcher
- Enclosing class:
- NetworkEvent
Dispatcher for sending packets in response to a received packet. Abstracts out the difference between wrapped packets
and unwrapped packets.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
(package private)
PacketDispatcher
(BiConsumer<ResourceLocation, FriendlyByteBuf> packetSink) -
Method Summary
Modifier and TypeMethodDescriptionvoid
sendPacket
(ResourceLocation resourceLocation, FriendlyByteBuf buffer)
-
Field Details
-
packetSink
BiConsumer<ResourceLocation,FriendlyByteBuf> packetSink
-
-
Constructor Details
-
PacketDispatcher
PacketDispatcher(BiConsumer<ResourceLocation, FriendlyByteBuf> packetSink) -
PacketDispatcher
private PacketDispatcher()
-
-
Method Details
-
sendPacket
-