public class Dispatcher
extends java.lang.Object
| Constructor and Description |
|---|
Dispatcher() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
sendToAllClients(T packet,
net.minecraft.server.MinecraftServer server)
Sends the packet to all the client players in the server, only if the players has the packet registered.
|
static <T> void |
sendToClient(T packet,
net.minecraft.server.level.ServerPlayer player)
Sends the packet to the client player, only if the player has the packet registered.
|
static <T> void |
sendToClients(T packet,
java.util.List<net.minecraft.server.level.ServerPlayer> players)
Sends the packet to the client players, only if the players has the packet registered.
|
static <T> void |
sendToClientsInLevel(T packet,
net.minecraft.server.level.ServerLevel level)
Sends the packet to all the client players in the level, only if the players has the packet registered.
|
static <T> void |
sendToClientsInRange(T packet,
net.minecraft.server.level.ServerLevel level,
net.minecraft.core.BlockPos pos,
double range)
Sends the packet to all the client players in range of a position, only if the players has the packet registered.
|
static <T> void |
sendToClientsLoadingChunk(T packet,
net.minecraft.world.level.chunk.LevelChunk chunk)
Sends the packet to all the client players loading a chunk, only if the players has the packet registered.
|
static <T> void |
sendToClientsLoadingPos(T packet,
net.minecraft.server.level.ServerLevel level,
net.minecraft.core.BlockPos pos)
Sends the packet to all the client players loading a position, only if the players has the packet registered.
|
static <T> void |
sendToClientsLoadingPos(T packet,
net.minecraft.server.level.ServerLevel level,
net.minecraft.world.level.ChunkPos pos)
Sends the packet to all the client players loading a position, only if the players has the packet registered.
|
static <T> void |
sendToServer(T packet)
Sends the packet to the server, if the server has the packet registered.
|
static <T> void |
sendToServer(T packet,
boolean ignoreCheck)
Sends the packet to the server.
|
public static <T> void sendToServer(T packet)
T - - The typepacket - - the packetpublic static <T> void sendToServer(T packet,
boolean ignoreCheck)
T - - The typepacket - - the packetignoreCheck - - ignore the check if the server has the packet registered.public static <T> void sendToClient(T packet,
net.minecraft.server.level.ServerPlayer player)
T - - The typepacket - - the packetplayer - - the playerpublic static <T> void sendToClients(T packet,
java.util.List<net.minecraft.server.level.ServerPlayer> players)
T - - The typepacket - - the packetplayers - - the playerspublic static <T> void sendToAllClients(T packet,
net.minecraft.server.MinecraftServer server)
T - - The typepacket - - the packetserver - - the serverpublic static <T> void sendToClientsInLevel(T packet,
net.minecraft.server.level.ServerLevel level)
T - - The typepacket - - the packetlevel - - the levelpublic static <T> void sendToClientsLoadingChunk(T packet,
net.minecraft.world.level.chunk.LevelChunk chunk)
T - - The typepacket - - the packetchunk - - the chunkpublic static <T> void sendToClientsLoadingPos(T packet,
net.minecraft.server.level.ServerLevel level,
net.minecraft.world.level.ChunkPos pos)
T - - The typepacket - - the packetlevel - - the levelpos - - the chunkpospublic static <T> void sendToClientsLoadingPos(T packet,
net.minecraft.server.level.ServerLevel level,
net.minecraft.core.BlockPos pos)
T - - The typepacket - - the packetlevel - - the levelpos - - the blockpospublic static <T> void sendToClientsInRange(T packet,
net.minecraft.server.level.ServerLevel level,
net.minecraft.core.BlockPos pos,
double range)
T - - The typepacket - - the packetlevel - - the levelpos - - the blockposrange - - the range