Package forestry.core.network

Examples of forestry.core.network.PacketUpdate


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

    if(currentFilter < FILTERS.length -1)
View Full Code Here


  }

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

  }

  public void sendTokenClick(int index) {
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = index;
    PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
    Proxies.net.sendToServer(packet);
  }
View Full Code Here

  }

  public void sendProbeClick() {
    PacketPayload payload = new PacketPayload(1, 0, 0);
    payload.intPayload[0] = -1;
    PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
    Proxies.net.sendToServer(packet);
  }
View Full Code Here

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

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

  }

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

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

    // / Send to server
    PacketPayload payload = new PacketPayload(0, 0, 1);
    payload.stringPayload[0] = text;

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

  }
View Full Code Here

      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

  @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

TOP

Related Classes of forestry.core.network.PacketUpdate

Copyright © 2018 www.massapicom. 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.