Search in sources :

Example 21 with PacketUpdate

use of forestry.core.network.PacketUpdate in project ForestryMC by ForestryMC.

the class ContainerWorktable method sendRecipeClick.

public void sendRecipeClick(int mouseButton, int recipeIndex) {
    PacketPayload payload = new PacketPayload(2, 0, 0);
    payload.intPayload[0] = mouseButton;
    payload.intPayload[1] = recipeIndex;
    PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
    Proxies.net.sendToServer(packet);
}
Also used : PacketPayload(forestry.core.network.PacketPayload) PacketUpdate(forestry.core.network.PacketUpdate)

Example 22 with PacketUpdate

use of forestry.core.network.PacketUpdate in project ForestryMC by ForestryMC.

the class TileFruitPod method fromPacket.

@Override
public void fromPacket(ForestryPacket packetRaw) {
    PacketUpdate packet = (PacketUpdate) packetRaw;
    maturity = packet.payload.shortPayload[0];
    if (packet.payload.intPayload != null && packet.payload.intPayload.length > 0) {
        indices = packet.payload.intPayload;
    }
    worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
Also used : PacketUpdate(forestry.core.network.PacketUpdate)

Aggregations

PacketUpdate (forestry.core.network.PacketUpdate)22 PacketPayload (forestry.core.network.PacketPayload)17 ItemStack (net.minecraft.item.ItemStack)3 PacketSocketUpdate (forestry.core.network.PacketSocketUpdate)2 TileEntity (net.minecraft.tileentity.TileEntity)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 IToolPipette (forestry.api.core.IToolPipette)1 IMailAddress (forestry.api.mail.IMailAddress)1 PacketLetterInfo (forestry.mail.network.PacketLetterInfo)1 PacketPOBoxInfo (forestry.mail.network.PacketPOBoxInfo)1