Package logisticspipes.network.abstractpackets

Examples of logisticspipes.network.abstractpackets.CoordinatesPacket


    return closestIdFound;
  }

  public void setNextSatellite(EntityPlayer player) {
    if (MainProxy.isClient(player.worldObj)) {
      final CoordinatesPacket packet = PacketHandler.getPacket(CPipeNextSatellite.class).setModulePos(this);
      MainProxy.sendPacketToServer(packet);
    } else {
      satelliteId = getNextConnectSatelliteId(false, -1);
      final CoordinatesPacket packet = PacketHandler.getPacket(CPipeSatelliteId.class).setPipeId(satelliteId).setModulePos(this);
      MainProxy.sendPacketToPlayer(packet, player);
    }

  }
View Full Code Here


    }
  }

  public void setPrevSatellite(EntityPlayer player) {
    if (MainProxy.isClient(player.worldObj)) {
      final CoordinatesPacket packet = PacketHandler.getPacket(CPipePrevSatellite.class).setModulePos(this);
      MainProxy.sendPacketToServer(packet);
    } else {
      satelliteId = getNextConnectSatelliteId(true, -1);
      final CoordinatesPacket packet = PacketHandler.getPacket(CPipeSatelliteId.class).setPipeId(satelliteId).setModulePos(this);
      MainProxy.sendPacketToPlayer(packet, player);
    }
  }
View Full Code Here

  }
 
  public void importFromCraftingTable(EntityPlayer player) {
    if(MainProxy.isClient(getWorld())) {
      // Send packet asking for import
      final CoordinatesPacket packet = PacketHandler.getPacket(CPipeSatelliteImport.class).setModulePos(this);
      MainProxy.sendPacketToServer(packet);
    } else {
      boolean fuzzyFlagsChanged = false;
      final WorldUtil worldUtil = new WorldUtil(getWorld(), getX(), getY(), getZ());
      for(final AdjacentTile tile: worldUtil.getAdjacentTileEntities(true)) {
        for(ICraftingRecipeProvider provider: SimpleServiceLocator.craftingRecipeProviders) {
          if(provider.importRecipe(tile.tile, _dummyInventory)) {
            if(provider instanceof IFuzzyRecipeProvider) {
              fuzzyFlagsChanged = ((IFuzzyRecipeProvider)provider).importFuzzyFlags(tile.tile, _dummyInventory, fuzzyCraftingFlagArray);
            }
            break;
          }
        }
      }
      // Send inventory as packet
      final CoordinatesPacket packet = PacketHandler.getPacket(CPipeSatelliteImportBack.class).setInventory(_dummyInventory).setModulePos(this);
      if(player != null) {
        MainProxy.sendPacketToPlayer(packet, player);
      }
      MainProxy.sendPacketToAllWatchingChunk(this.getX(), this.getZ(), MainProxy.getDimensionForWorld(getWorld()), packet);
     
View Full Code Here

TOP

Related Classes of logisticspipes.network.abstractpackets.CoordinatesPacket

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.