Examples of PacketPayload


Examples of forestry.core.network.PacketPayload

    Proxies.net.sendNetworkPacket(new PacketUpdate(PacketIds.TILE_UPDATE, xCoord, yCoord, zCoord, maturity), xCoord, yCoord, zCoord);
  }

  private ForestryPacket toPacket() {

    PacketPayload payload = new PacketPayload(indices.length, 1);
    payload.shortPayload[0] = maturity;
    payload.intPayload = indices;

    return new PacketUpdate(PacketIds.TILE_UPDATE, xCoord, yCoord, zCoord, payload);
  }
View Full Code Here

Examples of forestry.core.network.PacketPayload

  public PacketPayload getPacketPayload() {
    if (!ClassMap.classMappers.containsKey(this.getClass()))
      ClassMap.classMappers.put(this.getClass(), new ClassMap(this.getClass()));

    ClassMap classmap = ClassMap.classMappers.get(this.getClass());
    PacketPayload payload = new PacketPayload(classmap.intSize, classmap.floatSize, classmap.stringSize);

    try {
      classmap.setData(this, payload.intPayload, payload.floatPayload, payload.stringPayload, new IndexInPayload(0, 0, 0));
    } catch (IllegalAccessException e) {
      e.printStackTrace();
View Full Code Here

Examples of forestry.core.network.PacketPayload

    buttonList.add(new GuiBetterButton(1, guiLeft + 99, guiTop + 7, StandardButtonTextureSets.LEFT_BUTTON_SMALL));
    buttonList.add(new GuiBetterButton(2, guiLeft + 180, guiTop + 7, StandardButtonTextureSets.RIGHT_BUTTON_SMALL));
  }

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

Examples of forestry.core.network.PacketPayload

    this.tile = tile;
  }

  public void handleChipsetClick(int slot, EntityPlayer player, ItemStack itemstack) {
    if (!Proxies.common.isSimulating(player.worldObj)) {
      PacketPayload payload = new PacketPayload(1, 0, 0);
      payload.intPayload[0] = slot;
      Proxies.net.sendToServer(new PacketUpdate(PacketIds.CHIPSET_CLICK, payload));
      player.inventory.setItemStack(null);
      return;
    }
View Full Code Here

Examples of forestry.core.network.PacketPayload

  }

  public void handleSolderingIronClick(int slot, EntityPlayer player, ItemStack itemstack) {
    if (!Proxies.common.isSimulating(player.worldObj)) {
      PacketPayload payload = new PacketPayload(1, 0, 0);
      payload.intPayload[0] = slot;
      Proxies.net.sendToServer(new PacketUpdate(PacketIds.SOLDERING_IRON_CLICK, payload));
      return;
    }
View Full Code Here

Examples of forestry.core.network.PacketPayload

    Item held = itemstack.getItem();
    if (!(held instanceof IToolPipette))
      return;

    if (!Proxies.common.isSimulating(player.worldObj)) {
      PacketPayload payload = new PacketPayload(1, 0, 0);
      payload.intPayload[0] = slot;
      Proxies.net.sendToServer(new PacketUpdate(PacketIds.PIPETTE_CLICK, payload));
      return;
    }
View Full Code Here

Examples of forestry.core.network.PacketPayload

    }
  }

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

Examples of forestry.core.network.PacketPayload

    rebuildStationsList();
  }

  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

Examples of forestry.core.network.PacketPayload

    lastUpdate = tile.getGame().getLastUpdate();
    tile.sendBoard(player);
  }

  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

Examples of forestry.core.network.PacketPayload

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

  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
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.