Examples of PacketUpdate


Examples of forestry.core.network.PacketUpdate

      return;

    PacketPayload payload = new PacketPayload(0, 0, 1);
    payload.stringPayload[0] = addressName;

    PacketUpdate packet = new PacketUpdate(PacketIds.TRADING_ADDRESS_SET, payload);
    Proxies.net.sendToServer(packet);

    IMailAddress address = PostManager.postRegistry.getMailAddress(addressName);
    machine.setAddress(address);
  }
View Full Code Here

Examples of forestry.core.network.PacketUpdate

  @Override
  public void onPacketData(int packetID, DataInputStream data, EntityPlayer player) {

    try {

      PacketUpdate packet;
      switch (packetID) {
      case PacketIds.LETTER_INFO:
        PacketLetterInfo packetT = new PacketLetterInfo();
        packetT.readData(data);
        onLetterInfo(packetT);
        break;
      case PacketIds.POBOX_INFO:
        PacketPOBoxInfo packetP = new PacketPOBoxInfo();
        packetP.readData(data);
        onPOBoxInfo(packetP);
        break;
      case PacketIds.LETTER_RECIPIENT:
        packet = new PacketUpdate();
        packet.readData(data);
        onLetterRecipient(player, packet);
        break;
      case PacketIds.LETTER_TEXT:
        packet = new PacketUpdate();
        packet.readData(data);
        onLetterText(player, packet);
        break;
      case PacketIds.TRADING_ADDRESS_SET:
        packet = new PacketUpdate();
        packet.readData(data);
        onAddressSet(player, packet);
        break;
      case PacketIds.POBOX_INFO_REQUEST:
        onPOBoxInfoRequest(player);
        break;
View Full Code Here

Examples of forestry.core.network.PacketUpdate

    payload.intPayload[1] = 1;
    sendSelectionChange(payload);
  }

  private void sendSelectionChange(PacketPayload payload) {
    PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
    Proxies.net.sendToServer(packet);
    isNetSynched = false;
  }
View Full Code Here

Examples of forestry.core.network.PacketUpdate

  }

  public void updateContainer(World world) {
    if (!isNetSynched && !Proxies.common.isSimulating(world)) {
      isNetSynched = true;
      Proxies.net.sendToServer(new PacketUpdate(PacketIds.IMPRINT_SELECTION_GET));
    }
  }
View Full Code Here

Examples of forestry.core.network.PacketUpdate

  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);
  }
View Full Code Here

Examples of forestry.core.network.PacketUpdate

  public void sendRecipeClick(int mouseButton, int recipeIndex) {
    PacketPayload payload = new PacketPayload(2, 0, 0);
    payload.intPayload[0] = mouseButton;
    payload.intPayload[1] = recipeIndex;
    PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
    Proxies.net.sendToServer(packet);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.