Search in sources :

Example 21 with PacketPayload

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

the class GuiNaturalistInventory method flipPage.

private void flipPage(int page) {
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = page;
    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 PacketPayload

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

the class ContainerCatalogue method sendSelection.

private void sendSelection(boolean advance) {
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = advance ? 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 23 with PacketPayload

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

the class PipeLogicPropolis method sendTypeFilterChange.

public void sendTypeFilterChange(ForgeDirection orientation, EnumFilterType filter) {
    PacketPayload payload = new PacketPayload(2, 0, 0);
    payload.intPayload[0] = orientation.ordinal();
    payload.intPayload[1] = filter.ordinal();
    Proxies.net.sendToServer(new PacketUpdate(PacketIds.PROP_SEND_FILTER_CHANGE_TYPE, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, payload));
}
Also used : PacketPayload(forestry.core.network.PacketPayload) PacketUpdate(forestry.core.network.PacketUpdate)

Example 24 with PacketPayload

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

the class PipeLogicPropolis method sendGenomeFilterChange.

public void sendGenomeFilterChange(ForgeDirection orientation, int pattern, int allele, IAllele species) {
    PacketPayload payload = new PacketPayload(3, 0, 1);
    payload.intPayload[0] = orientation.ordinal();
    payload.intPayload[1] = pattern;
    payload.intPayload[2] = allele;
    if (species != null) {
        payload.stringPayload[0] = species.getUID();
    } else {
        payload.stringPayload[0] = "NULL";
    }
    Proxies.net.sendToServer(new PacketUpdate(PacketIds.PROP_SEND_FILTER_CHANGE_GENOME, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, payload));
}
Also used : PacketPayload(forestry.core.network.PacketPayload) PacketUpdate(forestry.core.network.PacketUpdate)

Example 25 with PacketPayload

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

the class TileAlvearyClimatiser method getPacketPayload.

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

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