Search in sources :

Example 26 with PacketPayload

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

the class TileAlvearySwarmer method getPacketPayload.

@Override
public PacketPayload getPacketPayload() {
    PacketPayload payload = new PacketPayload(0, 1);
    payload.shortPayload[0] = (short) (isActive ? 1 : 0);
    return payload;
}
Also used : PacketPayload(forestry.core.network.PacketPayload)

Example 27 with PacketPayload

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

the class ContainerImprinter method regressSelection.

public void regressSelection(int index, World world) {
    PacketPayload payload = new PacketPayload(2, 0, 0);
    payload.intPayload[0] = index;
    payload.intPayload[1] = 1;
    sendSelectionChange(payload);
}
Also used : PacketPayload(forestry.core.network.PacketPayload)

Example 28 with PacketPayload

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

the class TileFarm method getPacketPayload.

/* TILEFORESTRY */
@Override
public PacketPayload getPacketPayload() {
    PacketPayload payload = new PacketPayload(0, 3);
    payload.shortPayload[0] = (short) farmBlock.ordinal();
    payload.shortPayload[1] = (short) (isMaster() ? 1 : 0);
    // so the client can know if it is part of an integrated structure
    payload.shortPayload[2] = (short) masterY;
    return payload;
}
Also used : PacketPayload(forestry.core.network.PacketPayload)

Example 29 with PacketPayload

use of forestry.core.network.PacketPayload 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)

Aggregations

PacketPayload (forestry.core.network.PacketPayload)29 PacketUpdate (forestry.core.network.PacketUpdate)17 ItemStack (net.minecraft.item.ItemStack)4 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 IIndividual (forestry.api.genetics.IIndividual)1 IMailAddress (forestry.api.mail.IMailAddress)1