public class InventoryActionMessage extends java.lang.Object implements cpw.mods.fml.common.network.simpleimpl.IMessageHandler<InventoryActionMessage.Packet,cpw.mods.fml.common.network.simpleimpl.IMessage>
Modifier and Type | Class and Description |
---|---|
static class |
InventoryActionMessage.Packet
The packet holding the data
|
Constructor and Description |
---|
InventoryActionMessage() |
Modifier and Type | Method and Description |
---|---|
cpw.mods.fml.common.network.simpleimpl.IMessage |
onMessage(InventoryActionMessage.Packet message,
cpw.mods.fml.common.network.simpleimpl.MessageContext ctx)
Handles the
InventoryActionMessage.Packet received from the client. |
static void |
sendAction(MalisisInventoryContainer.ActionType action,
int inventoryId,
int slotNumber,
int code)
Sends GUI action to the server
MalisisInventoryContainer . |
public cpw.mods.fml.common.network.simpleimpl.IMessage onMessage(InventoryActionMessage.Packet message, cpw.mods.fml.common.network.simpleimpl.MessageContext ctx)
InventoryActionMessage.Packet
received from the client. Pass the action to the MalisisInventoryContainer
, and send the changes
back to the client.onMessage
in interface cpw.mods.fml.common.network.simpleimpl.IMessageHandler<InventoryActionMessage.Packet,cpw.mods.fml.common.network.simpleimpl.IMessage>
message
- the messagectx
- the ctxpublic static void sendAction(MalisisInventoryContainer.ActionType action, int inventoryId, int slotNumber, int code)
MalisisInventoryContainer
.action
- the actioninventoryId
- the inventory idslotNumber
- the slot numbercode
- the code