public class MessageManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MessageManager.MessageId |
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
Constructor and Description |
---|
MessageManager() |
Modifier and Type | Method and Description |
---|---|
static <I extends net.minecraftforge.fml.common.network.simpleimpl.IMessage> |
addType(MessageManager.MessageId id,
java.lang.Class<I> messageClass,
net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler<I,?> handler,
net.minecraftforge.fml.relauncher.Side... sides) |
static <I extends net.minecraftforge.fml.common.network.simpleimpl.IMessage> |
addTypeSent(MessageManager.MessageId id,
java.lang.Class<I> clazz,
net.minecraftforge.fml.relauncher.Side recv)
Registers a message as one that will not be received, but will be sent.
|
static void |
sendTo(net.minecraftforge.fml.common.network.simpleimpl.IMessage message,
net.minecraft.entity.player.EntityPlayerMP player)
Send this message to the specified player.
|
static void |
sendToAll(net.minecraftforge.fml.common.network.simpleimpl.IMessage message)
Send this message to everyone.
|
static void |
sendToAllAround(net.minecraftforge.fml.common.network.simpleimpl.IMessage message,
net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint point)
Send this message to everyone within a certain range of a point.
|
static void |
sendToDimension(net.minecraftforge.fml.common.network.simpleimpl.IMessage message,
int dimensionId)
Send this message to everyone within the supplied dimension.
|
static void |
sendToServer(net.minecraftforge.fml.common.network.simpleimpl.IMessage message)
Send this message to the server.
|
static <I extends net.minecraftforge.fml.common.network.simpleimpl.IMessage> |
wrapHandler(net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler<I,?> handler) |
public static <I extends net.minecraftforge.fml.common.network.simpleimpl.IMessage> void addTypeSent(MessageManager.MessageId id, java.lang.Class<I> clazz, net.minecraftforge.fml.relauncher.Side recv)
public static <I extends net.minecraftforge.fml.common.network.simpleimpl.IMessage> void addType(MessageManager.MessageId id, java.lang.Class<I> messageClass, net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler<I,?> handler, net.minecraftforge.fml.relauncher.Side... sides)
public static <I extends net.minecraftforge.fml.common.network.simpleimpl.IMessage> net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler<I,?> wrapHandler(net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler<I,?> handler)
public static void sendToAll(net.minecraftforge.fml.common.network.simpleimpl.IMessage message)
IMessageHandler
for this message type should be on the CLIENT side.message
- The message to sendpublic static void sendTo(net.minecraftforge.fml.common.network.simpleimpl.IMessage message, net.minecraft.entity.player.EntityPlayerMP player)
IMessageHandler
for this message type should be on the
CLIENT side.message
- The message to sendplayer
- The player to send it topublic static void sendToAllAround(net.minecraftforge.fml.common.network.simpleimpl.IMessage message, net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint point)
IMessageHandler
for this message
type should be on the CLIENT side.message
- The message to sendpoint
- The NetworkRegistry.TargetPoint
around which to
sendpublic static void sendToDimension(net.minecraftforge.fml.common.network.simpleimpl.IMessage message, int dimensionId)
IMessageHandler
for this message type
should be on the CLIENT side.message
- The message to senddimensionId
- The dimension id to targetpublic static void sendToServer(net.minecraftforge.fml.common.network.simpleimpl.IMessage message)
IMessageHandler
for this message type should be on the SERVER side.message
- The message to send