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);
}
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);
}
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));
}
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));
}
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;
}
Aggregations