public abstract class AbstractMessage<M extends AbstractMessage>
extends java.lang.Object
implements cpw.mods.fml.common.network.simpleimpl.IMessage, cpw.mods.fml.common.network.simpleimpl.IMessageHandler<M,cpw.mods.fml.common.network.simpleimpl.IMessage>
| Constructor and Description |
|---|
AbstractMessage() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
handleClientMessage(M message,
net.minecraft.entity.player.EntityPlayer player)
Called when the message is received on the client side.
|
abstract void |
handleServerMessage(M message,
net.minecraft.entity.player.EntityPlayer player)
Called when the message is received on the server side.
|
cpw.mods.fml.common.network.simpleimpl.IMessage |
onMessage(M message,
cpw.mods.fml.common.network.simpleimpl.MessageContext ctx) |
public cpw.mods.fml.common.network.simpleimpl.IMessage onMessage(M message, cpw.mods.fml.common.network.simpleimpl.MessageContext ctx)
onMessage in interface cpw.mods.fml.common.network.simpleimpl.IMessageHandler<M extends AbstractMessage,cpw.mods.fml.common.network.simpleimpl.IMessage>public abstract void handleClientMessage(M message, net.minecraft.entity.player.EntityPlayer player)
message: - An instance of the message that has been sent to the client.player: - An instance of the client side player, taken from the current Minecraft
instance.public abstract void handleServerMessage(M message, net.minecraft.entity.player.EntityPlayer player)
message: - An instance of the message that has been sent to the server. This can be
a dedicated server, or an integrated server.player: - An instance of the player who sent the message to the server. Taken from
ctx.getServerHandler().playerEntity.