Search in sources :

Example 1 with PacketPayload

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

the class ContainerImprinter method advanceSelection.

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

Example 2 with PacketPayload

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

the class ContainerImprinter method sendSelection.

public void sendSelection(EntityPlayer player) {
    PacketPayload payload = new PacketPayload(2, 0, 0);
    payload.intPayload[0] = inventory.getPrimaryIndex();
    payload.intPayload[1] = inventory.getSecondaryIndex();
    Proxies.net.sendToPlayer(new PacketUpdate(PacketIds.GUI_SELECTION, payload), player);
}
Also used : PacketPayload(forestry.core.network.PacketPayload) PacketUpdate(forestry.core.network.PacketUpdate)

Example 3 with PacketPayload

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

the class Engine method getPacketPayload.

@Override
public PacketPayload getPacketPayload() {
    PacketPayload payload = new PacketPayload(3, 1, 0);
    if (this.isActive) {
        payload.intPayload[0] = 1;
    } else {
        payload.intPayload[0] = 0;
    }
    payload.intPayload[1] = energyManager.toPacketInt();
    payload.intPayload[2] = heat;
    payload.floatPayload[0] = pistonSpeedServer;
    return payload;
}
Also used : PacketPayload(forestry.core.network.PacketPayload)

Example 4 with PacketPayload

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

the class ContainerSolderingIron method sendSelection.

public void sendSelection(EntityPlayer player) {
    PacketPayload payload = new PacketPayload(0, 0, 1);
    payload.stringPayload[0] = inventory.getLayout().getUID();
    Proxies.net.sendToPlayer(new PacketUpdate(PacketIds.GUI_SELECTION, payload), player);
}
Also used : PacketPayload(forestry.core.network.PacketPayload) PacketUpdate(forestry.core.network.PacketUpdate)

Example 5 with PacketPayload

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

the class ContainerCatalogue method cycleFilter.

public void cycleFilter() {
    if (!Proxies.common.isSimulating(player.worldObj)) {
        PacketPayload payload = new PacketPayload(1, 0, 0);
        payload.intPayload[0] = 2;
        PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
        Proxies.net.sendToServer(packet);
        return;
    }
    currentFilter = (currentFilter + 1) % FILTERS.size();
    rebuildStationsList();
}
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