public interface IPacketReceiver
IPacketNetwork, capable of receiving packets.| Modifier and Type | Method and Description |
|---|---|
net.minecraft.util.math.Vec3d |
getPosition()
Get the position in the world at which this receiver exists.
|
double |
getRange()
Get the maximum distance this receiver can send and receive messages.
|
net.minecraft.world.World |
getWorld()
Get the world in which this packet receiver exists.
|
boolean |
isInterdimensional()
Determine whether this receiver can receive packets from other dimensions.
|
void |
receiveDifferentDimension(Packet packet)
Receive a network packet from a different dimension.
|
void |
receiveSameDimension(Packet packet,
double distance)
Receive a network packet from the same dimension.
|
@Nonnull net.minecraft.world.World getWorld()
@Nonnull net.minecraft.util.math.Vec3d getPosition()
double getRange()
isInterdimensional(),
receiveSameDimension(Packet packet, double),
IPacketNetwork.transmitInterdimensional(Packet)boolean isInterdimensional()
getRange(),
receiveDifferentDimension(Packet),
IPacketNetwork.transmitInterdimensional(Packet)void receiveSameDimension(@Nonnull
Packet packet,
double distance)
packet - The packet to receive. Generally you should check that you are listening on the given channel and,
if so, queue the appropriate modem event.distance - The distance this packet has travelled from the source.Packet,
getRange(),
IPacketNetwork.transmitSameDimension(Packet, double),
IPacketNetwork.transmitInterdimensional(Packet)void receiveDifferentDimension(@Nonnull
Packet packet)
packet - The packet to receive. Generally you should check that you are listening on the given channel and,
if so, queue the appropriate modem event.Packet,
IPacketNetwork.transmitInterdimensional(Packet),
IPacketNetwork.transmitSameDimension(Packet, double),
isInterdimensional()