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