Package forestry.core.network

Examples of forestry.core.network.PacketPayload


  public void requestFilterSet() {
    Proxies.net.sendToServer(new PacketCoordinates(PacketIds.PROP_REQUEST_FILTER_SET, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord));
  }

  public void sendTypeFilterChange(ForgeDirection orientation, EnumFilterType filter) {
    PacketPayload payload = new PacketPayload(2, 0, 0);
    payload.intPayload[0] = orientation.ordinal();
    payload.intPayload[1] = filter.ordinal();
    Proxies.net.sendToServer(new PacketUpdate(PacketIds.PROP_SEND_FILTER_CHANGE_TYPE, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, payload));
  }
View Full Code Here


    payload.intPayload[1] = filter.ordinal();
    Proxies.net.sendToServer(new PacketUpdate(PacketIds.PROP_SEND_FILTER_CHANGE_TYPE, pipe.container.xCoord, pipe.container.yCoord, pipe.container.zCoord, payload));
  }

  public void sendGenomeFilterChange(ForgeDirection orientation, int pattern, int allele, IAllele species) {
    PacketPayload payload = new PacketPayload(3, 0, 1);
    payload.intPayload[0] = orientation.ordinal();
    payload.intPayload[1] = pattern;
    payload.intPayload[2] = allele;
    if (species != null)
      payload.stringPayload[0] = species.getUID();
View Full Code Here

  protected abstract void createInventory();

  /* TILEFORESTRY */
  @Override
  public PacketPayload getPacketPayload() {
    PacketPayload payload = new PacketPayload(0, 1);
    payload.shortPayload[0] = (short) farmBlock.ordinal();
    return payload;
  }
View Full Code Here

  // INETWORKEDTILE IMPLEMENTATION
  @Override
  public PacketPayload getPacketPayload() {

    PacketPayload payload = null;

    return payload;
  }
View Full Code Here

    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

  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

    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

    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

  }

  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

    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

TOP

Related Classes of forestry.core.network.PacketPayload

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.