Search in sources :

Example 11 with PacketUpdate

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

the class ContainerEscritoire method sendProbeClick.

public void sendProbeClick() {
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = -1;
    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 12 with PacketUpdate

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

the class ContainerEscritoire method sendTokenClick.

public void sendTokenClick(int index) {
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = index;
    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 13 with PacketUpdate

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

the class TileFruitPod method toPacket.

private ForestryPacket toPacket() {
    PacketPayload payload = new PacketPayload(indices.length, 1);
    payload.shortPayload[0] = maturity;
    payload.intPayload = indices;
    return new PacketUpdate(PacketIds.TILE_UPDATE, xCoord, yCoord, zCoord, payload);
}
Also used : PacketPayload(forestry.core.network.PacketPayload) PacketUpdate(forestry.core.network.PacketUpdate)

Example 14 with PacketUpdate

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

the class ContainerLiquidTanks method handlePipetteClickClient.

@SideOnly(Side.CLIENT)
public void handlePipetteClickClient(int slot, EntityPlayer player) {
    ItemStack itemstack = player.inventory.getItemStack();
    if (itemstack == null || !(itemstack.getItem() instanceof IToolPipette)) {
        return;
    }
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = slot;
    Proxies.net.sendToServer(new PacketUpdate(PacketIds.PIPETTE_CLICK, payload));
}
Also used : PacketPayload(forestry.core.network.PacketPayload) IToolPipette(forestry.api.core.IToolPipette) PacketUpdate(forestry.core.network.PacketUpdate) ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 15 with PacketUpdate

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

the class ContainerLetter method setRecipient.

public void setRecipient(String recipientName, EnumAddressee type) {
    if (StringUtils.isBlank(recipientName) || type == null) {
        return;
    }
    // / Send to server
    PacketPayload payload = new PacketPayload(0, 0, 2);
    payload.stringPayload[0] = recipientName;
    payload.stringPayload[1] = type.toString();
    PacketUpdate packet = new PacketUpdate(PacketIds.LETTER_RECIPIENT, payload);
    Proxies.net.sendToServer(packet);
}
Also used : PacketPayload(forestry.core.network.PacketPayload) 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