use of forestry.core.network.PacketUpdate 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);
}
use of forestry.core.network.PacketUpdate in project ForestryMC by ForestryMC.
the class ContainerImprinter method updateContainer.
public void updateContainer(World world) {
if (!isNetSynced && !Proxies.common.isSimulating(world)) {
isNetSynced = true;
Proxies.net.sendToServer(new PacketUpdate(PacketIds.IMPRINT_SELECTION_GET));
}
}
use of forestry.core.network.PacketUpdate in project ForestryMC by ForestryMC.
the class ContainerSolderingIron method sendSelectionChange.
private void sendSelectionChange(PacketPayload payload) {
PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
Proxies.net.sendToServer(packet);
}
use of forestry.core.network.PacketUpdate 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);
}
use of forestry.core.network.PacketUpdate in project ForestryMC by ForestryMC.
the class PacketHandlerMail method onPacketData.
@Override
public boolean onPacketData(int packetID, DataInputStream data, EntityPlayer player) throws IOException {
PacketUpdate packet;
switch(packetID) {
case PacketIds.LETTER_INFO:
PacketLetterInfo packetT = new PacketLetterInfo();
packetT.readData(data);
onLetterInfo(packetT);
return true;
case PacketIds.POBOX_INFO:
PacketPOBoxInfo packetP = new PacketPOBoxInfo();
packetP.readData(data);
onPOBoxInfo(packetP);
return true;
case PacketIds.LETTER_RECIPIENT:
packet = new PacketUpdate();
packet.readData(data);
onLetterRecipient(player, packet);
return true;
case PacketIds.LETTER_TEXT:
packet = new PacketUpdate();
packet.readData(data);
onLetterText(player, packet);
return true;
case PacketIds.TRADING_ADDRESS_SET:
packet = new PacketUpdate();
packet.readData(data);
onAddressSet(player, packet);
return true;
case PacketIds.POBOX_INFO_REQUEST:
onPOBoxInfoRequest(player);
return true;
}
return false;
}
Aggregations