public interface IMalisisMessageHandler<REQ extends net.minecraftforge.fml.common.network.simpleimpl.IMessage,REPLY extends net.minecraftforge.fml.common.network.simpleimpl.IMessage>
extends net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler<REQ,REPLY>
IMessageHandler to automatically handle the task scheduling to the main thread of receiving side.| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.entity.player.EntityPlayer |
getPlayer(net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
Gets the correct client or server
EntityPlayer based on MessageContext. |
static net.minecraft.world.World |
getWorld(net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
Gets the correct client or server
World based on MessageContext. |
default REPLY |
onMessage(REQ message,
net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx) |
void |
process(REQ message,
net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
Processes the received message.
|
default boolean |
useTask() |
default REPLY onMessage(REQ message, net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
void process(REQ message, net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
message - the messagectx - the ctxdefault boolean useTask()
static net.minecraft.world.World getWorld(net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
World based on MessageContext.ctx - the ctxstatic net.minecraft.entity.player.EntityPlayer getPlayer(net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx)
EntityPlayer based on MessageContext.ctx - the ctx