Package logisticspipes.network.abstractpackets

Examples of logisticspipes.network.abstractpackets.ModernPacket


      }
      MainProxy.sendPacketToAllWatchingChunk(this.getX(), this.getZ(), MainProxy.getDimensionForWorld(getWorld()), packet);
     
      if(fuzzyFlagsChanged && this.getUpgradeManager().isFuzzyCrafter()) {
        for(int i = 0; i < 9; i++) {
          final ModernPacket pak = PacketHandler.getPacket(CraftingFuzzyFlag.class).setInteger2(fuzzyCraftingFlagArray[i]).setInteger(i).setModulePos(this);
          if(player != null) MainProxy.sendPacketToPlayer(pak, player);
          MainProxy.sendPacketToAllWatchingChunk(this.getX(), this.getZ(), MainProxy.getDimensionForWorld(getWorld()), pak);
        }
      }
    }
View Full Code Here


      else
        fuzzyCraftingFlagArray[slot] = flag;
    else
    {
      fuzzyCraftingFlagArray[slot] ^= 1 << flag;
      ModernPacket pak = PacketHandler.getPacket(CraftingFuzzyFlag.class).setInteger2(fuzzyCraftingFlagArray[slot]).setInteger(slot).setModulePos(this);
      if(player != null)
        MainProxy.sendPacketToPlayer(pak, player);
      MainProxy.sendPacketToAllWatchingChunk(getX(), getZ(), MainProxy.getDimensionForWorld(getWorld()), pak);
    }
  }
View Full Code Here

      if (++clientSyncCounter > 40) {
        clientSyncCounter = 0;
        init = true;
      }
      if(clientSyncCounter < 0) clientSyncCounter = 0;
      ModernPacket packet = computeFluidUpdate(init, true);
      if (packet != null) {
        MainProxy.sendPacketToAllWatchingChunk(container.xCoord, container.zCoord, MainProxy.getDimensionForWorld(getWorld()), packet);
      }
    }
  }
View Full Code Here

 
  @Override
  public void playerStartWatching(EntityPlayer player, int mode) {
    if(mode == 1) {
      localModeWatchers.add(player);
      final ModernPacket packet = PacketHandler.getPacket(SatPipeSetID.class).setSatID(satelliteId).setPosX(getX()).setPosY(getY()).setPosZ(getZ());
      MainProxy.sendPacketToPlayer(packet, player);
      updateInv(true);
    } else {
      super.playerStartWatching(player, mode);
    }
View Full Code Here

  public void setNextId(EntityPlayer player) {
    satelliteId = findId(1);
    ensureAllSatelliteStatus();
    if (MainProxy.isClient(player.worldObj)) {
      final ModernPacket packet = PacketHandler.getPacket(SatPipeNext.class).setPosX(getX()).setPosY(getY()).setPosZ(getZ());
      MainProxy.sendPacketToServer(packet);
    } else {
      final ModernPacket packet = PacketHandler.getPacket(SatPipeSetID.class).setSatID(satelliteId).setPosX(getX()).setPosY(getY()).setPosZ(getZ());
      MainProxy.sendPacketToPlayer(packet, player);
    }
    updateWatchers();
  }
View Full Code Here

  public void setPrevId(EntityPlayer player) {
    satelliteId = findId(-1);
    ensureAllSatelliteStatus();
    if (MainProxy.isClient(player.worldObj)) {
      final ModernPacket packet = PacketHandler.getPacket(SatPipePrev.class).setPosX(getX()).setPosY(getY()).setPosZ(getZ());
      MainProxy.sendPacketToServer(packet);
    } else {
      final ModernPacket packet = PacketHandler.getPacket(SatPipeSetID.class).setSatID(satelliteId).setPosX(getX()).setPosY(getY()).setPosZ(getZ());
      MainProxy.sendPacketToPlayer(packet, player);
    }
    updateWatchers();
  }
View Full Code Here

  }

  @Override
  public void onWrenchClicked(EntityPlayer entityplayer) {
    // Send the satellite id when opening gui
    final ModernPacket packet = PacketHandler.getPacket(SatPipeSetID.class).setSatID(satelliteId).setPosX(getX()).setPosY(getY()).setPosZ(getZ());
    MainProxy.sendPacketToPlayer(packet, entityplayer);
    entityplayer.openGui(LogisticsPipes.instance, GuiIDs.GUI_SatelitePipe_ID, getWorld(), getX(), getY(), getZ());
  }
View Full Code Here

TOP

Related Classes of logisticspipes.network.abstractpackets.ModernPacket

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.