use of forestry.core.network.PacketPayload in project ForestryMC by ForestryMC.
the class TileAnalyzer method getPacketPayload.
/* Network */
public PacketPayload getPacketPayload() {
ItemStack displayStack = getIndividualOnDisplay();
if (displayStack == null) {
return null;
}
IIndividual displayIndividual = AlleleManager.alleleRegistry.getIndividual(displayStack);
int type = PluginApiculture.beeInterface.getType(displayStack).ordinal();
PacketPayload payload = new PacketPayload();
payload.stringPayload = new String[1];
payload.shortPayload = new short[2];
payload.stringPayload[0] = displayIndividual.getIdent();
payload.shortPayload[0] = (short) type;
payload.shortPayload[1] = (short) displayStack.stackSize;
return payload;
}
use of forestry.core.network.PacketPayload 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));
}
use of forestry.core.network.PacketPayload in project ForestryMC by ForestryMC.
the class Mill method getPacketPayload.
@Override
public PacketPayload getPacketPayload() {
PacketPayload payload = new PacketPayload(2, 1, 0);
payload.intPayload[0] = charge;
payload.intPayload[1] = stage;
payload.floatPayload[0] = speed;
return payload;
}
use of forestry.core.network.PacketPayload in project ForestryMC by ForestryMC.
the class MachineTrader method getPacketPayload.
@Override
public PacketPayload getPacketPayload() {
if (address == null || address.getName() == null) {
return null;
}
PacketPayload payload = new PacketPayload(0, 0, 1);
payload.stringPayload[0] = address.getName();
return payload;
}
use of forestry.core.network.PacketPayload 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);
}
Aggregations