public class NetworkHelper
extends java.lang.Object
PacketDistributor
is ugly)Constructor and Description |
---|
NetworkHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
sendNearbyPacket(net.minecraftforge.fml.network.PacketDistributor.TargetPoint targetPoint,
PixelmonPacket packet)
Sends a packet to all nearby players
|
static void |
sendNearbyPacket(PixelmonPacket packet,
net.minecraftforge.fml.network.PacketDistributor.TargetPoint targetPoint)
Sends a packet to all nearby players
|
static void |
sendPacket(PixelmonPacket packet,
net.minecraft.entity.player.ServerPlayerEntity serverPlayer)
Sends the packet to the player
|
static void |
sendPacket(net.minecraft.entity.player.ServerPlayerEntity serverPlayer,
PixelmonPacket packet)
Sends the packet to the player
|
static void |
sendToAll(PixelmonPacket packet)
Sends a packet to all players
|
static void |
sendToAllTracking(PixelmonPacket packet,
net.minecraft.entity.Entity entity)
Sends a packet to all nearby players
|
static void |
sendToDimension(PixelmonPacket packet,
net.minecraft.world.World world)
Sends a packet to all nearby players
|
static void |
sendToServer(PixelmonPacket packet)
Sends a packet to the server
|
public static void sendPacket(PixelmonPacket packet, net.minecraft.entity.player.ServerPlayerEntity serverPlayer)
serverPlayer
- The player implementationpacket
- The packet to send to the playerpublic static void sendPacket(net.minecraft.entity.player.ServerPlayerEntity serverPlayer, PixelmonPacket packet)
serverPlayer
- The player implementationpacket
- The packet to send to the playerpublic static void sendNearbyPacket(PixelmonPacket packet, net.minecraftforge.fml.network.PacketDistributor.TargetPoint targetPoint)
targetPoint
- The point to get nearby players frompacket
- The packet to sendpublic static void sendNearbyPacket(net.minecraftforge.fml.network.PacketDistributor.TargetPoint targetPoint, PixelmonPacket packet)
targetPoint
- The point to get nearby players frompacket
- The packet to sendpublic static void sendToDimension(PixelmonPacket packet, net.minecraft.world.World world)
world
- The world to get all players frompacket
- The packet to sendpublic static void sendToAllTracking(PixelmonPacket packet, net.minecraft.entity.Entity entity)
entity
- The entity to get all players trackingpacket
- The packet to sendpublic static void sendToAll(PixelmonPacket packet)
packet
- The packet to sendpublic static void sendToServer(PixelmonPacket packet)
packet
- The packet to send