Package net.minecraftforge.fml.network
Class PacketDistributor.PacketTarget
- java.lang.Object
-
- net.minecraftforge.fml.network.PacketDistributor.PacketTarget
-
- Enclosing class:
- PacketDistributor<T>
public static class PacketDistributor.PacketTarget extends java.lang.Object
A Distributor curried with a specific value instance, for actual dispatch- See Also:
SimpleChannel.send(PacketTarget, Object)
-
-
Field Summary
Fields Modifier and Type Field Description private PacketDistributor<?>
distributor
private java.util.function.Consumer<IPacket<?>>
packetConsumer
-
Constructor Summary
Constructors Constructor Description PacketTarget(java.util.function.Consumer<IPacket<?>> packetConsumer, PacketDistributor<?> distributor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkDirection
getDirection()
void
send(IPacket<?> packet)
-
-
-
Field Detail
-
packetConsumer
private final java.util.function.Consumer<IPacket<?>> packetConsumer
-
distributor
private final PacketDistributor<?> distributor
-
-
Constructor Detail
-
PacketTarget
PacketTarget(java.util.function.Consumer<IPacket<?>> packetConsumer, PacketDistributor<?> distributor)
-
-
Method Detail
-
send
public void send(IPacket<?> packet)
-
getDirection
public NetworkDirection getDirection()
-
-