Advertisement
Link712011

Chest Sorter ccfr3

Oct 12th, 2017
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 44.45 KB | None | 0 0
  1. local move = require('movement')
  2. local utilitie = require('utilities')
  3. local energy = require('energy')
  4. local inventory = require('inventory')
  5. local net = require('net')
  6.  
  7. local component = require('component')
  8. local robot = require('robot')
  9. local side = require('sides')
  10.  
  11. local LENTH_MAX = 71
  12. local REQ_ENERGY_PER_LOOP = 8000
  13. local IDLE_SLEEP_TIME = 60
  14. local PASTE_URL = "https://pastebin.com/raw/3yHDsrqX"
  15. local FILEPATH = "sort"
  16. local UNKNOWN_LIST = "unsortable_items"
  17. local arg = {...}
  18.  
  19. function get_item_list_right()
  20.     local right = {}
  21.     local i = 1
  22.  
  23.     while i <= LENTH_MAX do
  24.         right[i] = {}
  25.         i = i + 1
  26.     end
  27.     right[1][#right[1] + 1] = "minecraft:cobblestone"
  28.     right[2][#right[2] + 1] = "minecraft:dirt"
  29.     right[3][#right[3] + 1] = "minecraft:gravel"
  30.     right[4][#right[4] + 1] = "minecraft:glass"
  31.     right[5][#right[5] + 1] = "minecraft:sand"
  32.     right[6][#right[6] + 1] = "chisel:limestone"
  33.     right[7][#right[7] + 1] = "chisel:marble"
  34.     right[7][#right[7] + 1] = "ProjRed|Exploration:projectred.exploration.stone,0"
  35.     right[8][#right[8] + 1] = "minecraft:grass"
  36.     right[9][#right[9] + 1] = "minecraft:stone,0"
  37.     right[10][#right[10] + 1] = "minecraft:log"
  38.     right[10][#right[10] + 1] = "minecraft:log2"
  39.     right[11][#right[11] + 1] = "minecraft:iron_ingot"
  40.     right[12][#right[12] + 1] = "minecraft:gold_ingot"
  41.     right[12][#right[12] + 1] = "minecraft:gold_block"
  42.     right[13][#right[13] + 1] = "minecraft:diamond"
  43.     right[14][#right[14] + 1] = "minecraft:emerald"
  44.     right[15][#right[15] + 1] = "TConstruct:materials,9"
  45.     right[15][#right[15] + 1] = "ThermalFoundation:material,64"
  46.     right[16][#right[16] + 1] = "TConstruct:materials,10"
  47.     right[16][#right[16] + 1] = "ThermalFoundation:material,65"
  48.     right[17][#right[17] + 1] = "ThermalFoundation:material,66"
  49.     right[18][#right[18] + 1] = "TConstruct:materials,5"
  50.     right[18][#right[18] + 1] = "TConstruct:materials,15"
  51.     right[18][#right[18] + 1] = "TConstruct:materials,18"
  52.     right[18][#right[18] + 1] = "TConstruct:materials,34"
  53.     right[18][#right[18] + 1] = "TConstruct:materials,3"
  54.     right[18][#right[18] + 1] = "TConstruct:materials,4"
  55.     right[18][#right[18] + 1] = "ProjRed|Core:projectred.core.part,10"
  56.     right[19][#right[19] + 1] = "ThermalFoundation:material,71"
  57.     right[19][#right[19] + 1] = "ThermalFoundation:material,69"
  58.     right[19][#right[19] + 1] = "ThermalFoundation:material,76"
  59.     right[19][#right[19] + 1] = "ThermalFoundation:material,75"
  60.     right[19][#right[19] + 1] = "ThermalFoundation:material,74"
  61.     right[19][#right[19] + 1] = "ThermalFoundation:material,106"
  62.     right[20][#right[20] + 1] = "ThermalFoundation:material,67"
  63.     right[21][#right[21] + 1] = "TConstruct:materials,13"
  64.     right[21][#right[21] + 1] = "ThermalFoundation:material,73"
  65.     right[22][#right[22] + 1] = "ThermalFoundation:material,68"
  66.     right[23][#right[23] + 1] = "TConstruct:materials,14"
  67.     right[24][#right[24] + 1] = "ThermalFoundation:material,72"
  68.     right[25][#right[25] + 1] = "TConstruct:materials,11"
  69.     right[26][#right[26] + 1] = "minecraft:ender_pearl"
  70.     right[27][#right[27] + 1] = "minecraft:leather"
  71.     right[28][#right[28] + 1] = "minecraft:wool"
  72.     right[29][#right[29] + 1] = "minecraft:bone"
  73.     right[30][#right[30] + 1] = "minecraft:rotten_flesh"
  74.     right[31][#right[31] + 1] = "minecraft:gunpowder"
  75.     right[32][#right[32] + 1] = "minecraft:glowstone"
  76.     right[32][#right[32] + 1] = "minecraft:glowstone_dust"
  77.     right[32][#right[32] + 1] = "chisel:glowstone"
  78.     right[33][#right[33] + 1] = "minecraft:ghast_tear"
  79.     right[33][#right[33] + 1] = "minecraft:skull"
  80.     right[33][#right[33] + 1] = "OpenBlocks:trophy"
  81.     right[33][#right[33] + 1] = "minecraft:saddle"
  82.     right[33][#right[33] + 1] = "minecraft:tnt"
  83.     right[33][#right[33] + 1] = "minecraft:name_tag"
  84.     right[33][#right[33] + 1] = "TConstruct:materials,8"
  85.     right[33][#right[33] + 1] = "ThermalFoundation:material,1028"
  86.     right[33][#right[33] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.MiscSoulFire"
  87.     right[33][#right[33] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.MiscFurnaceFuel"
  88.     right[33][#right[33] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodBerryFire"
  89.     right[33][#right[33] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.MiscBook"
  90.     right[33][#right[33] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodSmallAppleGold"
  91.     right[33][#right[33] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodBerryIce"
  92.     right[34][#right[34] + 1] = "minecraft:reeds"
  93.     right[35][#right[35] + 1] = "minecraft:apple"
  94.     right[35][#right[35] + 1] = "minecraft:cookie"
  95.     right[35][#right[35] + 1] = "minecraft:bread"
  96.     right[35][#right[35] + 1] = "minecraft:wheat"
  97.     right[35][#right[35] + 1] = "minecraft:pumpkin"
  98.     right[35][#right[35] + 1] = "minecraft:golden_carrot"
  99.     right[35][#right[35] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodBerryCure"
  100.     right[36][#right[36] + 1] = "minecraft:wheat_seeds"
  101.     right[36][#right[36] + 1] = "minecraft:pumpkin_seeds"
  102.     right[36][#right[36] + 1] = "minecraft:melon_seeds"
  103.     right[36][#right[36] + 1] = "harvestcraft:bambooshootseedItem"
  104.     right[36][#right[36] + 1] = "harvestcraft:spinachseedItem"
  105.     right[36][#right[36] + 1] = "harvestcraft:barleyseedItem"
  106.     right[36][#right[36] + 1] = "harvestcraft:beanseedItem"
  107.     right[36][#right[36] + 1] = "harvestcraft:beetseedItem"
  108.     right[36][#right[36] + 1] = "harvestcraft:broccoliseedItem"
  109.     right[36][#right[36] + 1] = "harvestcraft:brusselsproutseedItem"
  110.     right[36][#right[36] + 1] = "harvestcraft:cabbageseedItem"
  111.     right[36][#right[36] + 1] = "harvestcraft:cactusfruitseedItem"
  112.     right[36][#right[36] + 1] = "harvestcraft:cantaloupeseedItem"
  113.     right[36][#right[36] + 1] = "harvestcraft:chilipepperseedItem"
  114.     right[36][#right[36] + 1] = "harvestcraft:coffeeseedItem"
  115.     right[36][#right[36] + 1] = "harvestcraft:berrygarden"
  116.     right[36][#right[36] + 1] = "harvestcraft:cactusfruitItem"
  117.     right[36][#right[36] + 1] = "harvestcraft:pamappleSapling"
  118.     right[36][#right[36] + 1] = "harvestcraft:blackberryItem"
  119.     right[36][#right[36] + 1] = "harvestcraft:cranberryseedItem"
  120.     right[36][#right[36] + 1] = "harvestcraft:eggplantseedItem"
  121.     right[36][#right[36] + 1] = "harvestcraft:garlicseedItem"
  122.     right[36][#right[36] + 1] = "harvestcraft:grapeseedItem"
  123.     right[36][#right[36] + 1] = "harvestcraft:leekseedItem"
  124.     right[36][#right[36] + 1] = "harvestcraft:oatsseedItem"
  125.     right[36][#right[36] + 1] = "harvestcraft:onionseedItem"
  126.     right[36][#right[36] + 1] = "harvestcraft:parsnipseedItem"
  127.     right[36][#right[36] + 1] = "harvestcraft:peanutseedItem"
  128.     right[36][#right[36] + 1] = "harvestcraft:peasseedItem"
  129.     right[36][#right[36] + 1] = "harvestcraft:pineappleseedItem"
  130.     right[36][#right[36] + 1] = "harvestcraft:radishseedItem"
  131.     right[36][#right[36] + 1] = "harvestcraft:raspberryseedItem"
  132.     right[36][#right[36] + 1] = "harvestcraft:rutabagaseedItem"
  133.     right[36][#right[36] + 1] = "harvestcraft:ryeseedItem"
  134.     right[36][#right[36] + 1] = "harvestcraft:soybeanseedItem"
  135.     right[36][#right[36] + 1] = "harvestcraft:strawberryseedItem"
  136.     right[36][#right[36] + 1] = "harvestcraft:sweetpotatoseedItem"
  137.     right[36][#right[36] + 1] = "harvestcraft:teaseedItem"
  138.     right[36][#right[36] + 1] = "harvestcraft:turnipseedItem"
  139.     right[36][#right[36] + 1] = "harvestcraft:waterchestnutseedItem"
  140.     right[36][#right[36] + 1] = "harvestcraft:whitemushroomseedItem"
  141.     right[36][#right[36] + 1] = "harvestcraft:wintersquashseedItem"
  142.     right[36][#right[36] + 1] = "harvestcraft:candleberryseedItem"
  143.     right[36][#right[36] + 1] = "harvestcraft:cottonseedItem"
  144.     right[36][#right[36] + 1] = "harvestcraft:soybeanseedItem"
  145.     right[36][#right[36] + 1] = "harvestcraft:spinachseedItem"
  146.     right[36][#right[36] + 1] = "harvestcraft:soybeanseedItem"
  147.     right[36][#right[36] + 1] = "harvestcraft:cornseedItem"
  148.     right[36][#right[36] + 1] = "harvestcraft:artichokeseedItem"
  149.     right[36][#right[36] + 1] = "harvestcraft:asparagusseedItem"
  150.     right[36][#right[36] + 1] = "harvestcraft:cauliflowerseedItem"
  151.     right[36][#right[36] + 1] = "harvestcraft:cucumberseedItem"
  152.     right[36][#right[36] + 1] = "harvestcraft:curryleafseedItem"
  153.     right[36][#right[36] + 1] = "harvestcraft:kiwiseedItem"
  154.     right[36][#right[36] + 1] = "harvestcraft:okraseedItem"
  155.     right[36][#right[36] + 1] = "harvestcraft:rhubarbseedItem"
  156.     right[36][#right[36] + 1] = "harvestcraft:sesameseedsseedItem"
  157.     right[36][#right[36] + 1] = "harvestcraft:tomatoseedItem"
  158.     right[36][#right[36] + 1] = "harvestcraft:zucchiniseedItem"
  159.     right[36][#right[36] + 1] = "harvestcraft:blueberryseedItem"
  160.     right[36][#right[36] + 1] = "harvestcraft:riceseedItem"
  161.     right[36][#right[36] + 1] = "harvestcraft:scallionseedItem"
  162.     right[36][#right[36] + 1] = "ExtraUtilities:plant/ender_lilly"
  163.     right[37][#right[37] + 1] = "minecraft:enchanted_book"
  164.     right[38][#right[38] + 1] = "harvestcraft:lettuceItem"
  165.     right[38][#right[38] + 1] = "harvestcraft:cauliflowerItem"
  166.     right[38][#right[38] + 1] = "harvestcraft:celeryItem"
  167.     right[38][#right[38] + 1] = "harvestcraft:kiwiItem"
  168.     right[38][#right[38] + 1] = "harvestcraft:leekItem"
  169.     right[38][#right[38] + 1] = "harvestcraft:chilipepperItem"
  170.     right[38][#right[38] + 1] = "harvestcraft:mustardseedsItem"
  171.     right[38][#right[38] + 1] = "harvestcraft:cornItem"
  172.     right[38][#right[38] + 1] = "harvestcraft:cucumberItem"
  173.     right[38][#right[38] + 1] = "harvestcraft:oatsItem"
  174.     right[38][#right[38] + 1] = "harvestcraft:bambooshootItem"
  175.     right[38][#right[38] + 1] = "harvestcraft:cantaloupeItem"
  176.     right[38][#right[38] + 1] = "harvestcraft:peanutItem"
  177.     right[38][#right[38] + 1] = "harvestcraft:artichokeItem"
  178.     right[38][#right[38] + 1] = "harvestcraft:cabbageItem"
  179.     right[38][#right[38] + 1] = "harvestcraft:okraItem"
  180.     right[38][#right[38] + 1] = "harvestcraft:onionItem"
  181.     right[38][#right[38] + 1] = "harvestcraft:candleberryItem"
  182.     right[38][#right[38] + 1] = "harvestcraft:asparagusItem"
  183.     right[38][#right[38] + 1] = "harvestcraft:barleyItem"
  184.     right[38][#right[38] + 1] = "harvestcraft:walnutItem"
  185.     right[38][#right[38] + 1] = "harvestcraft:zucchiniItem"
  186.     right[38][#right[38] + 1] = "harvestcraft:rutabagaItem"
  187.     right[38][#right[38] + 1] = "harvestcraft:eggplantItem"
  188.     right[38][#right[38] + 1] = "harvestcraft:gooseberryItem"
  189.     right[38][#right[38] + 1] = "harvestcraft:beetItem"
  190.     right[38][#right[38] + 1] = "harvestcraft:radishItem"
  191.     right[38][#right[38] + 1] = "harvestcraft:beanItem"
  192.     right[38][#right[38] + 1] = "harvestcraft:gingerItem"
  193.     right[38][#right[38] + 1] = "harvestcraft:rhubarbItem"
  194.     right[38][#right[38] + 1] = "harvestcraft:wintersquashItem"
  195.     right[38][#right[38] + 1] = "harvestcraft:raspberryItem"
  196.     right[38][#right[38] + 1] = "harvestcraft:garlicItem"
  197.     right[38][#right[38] + 1] = "harvestcraft:queenbeeItem"
  198.     right[38][#right[38] + 1] = "harvestcraft:sesameseedsItem"
  199.     right[38][#right[38] + 1] = "harvestcraft:scallionItem"
  200.     right[38][#right[38] + 1] = "harvestcraft:ryeItem"
  201.     right[38][#right[38] + 1] = "harvestcraft:pineappleItem"
  202.     right[38][#right[38] + 1] = "harvestcraft:mangoItem"
  203.     right[38][#right[38] + 1] = "harvestcraft:grapeItem"
  204.     right[38][#right[38] + 1] = "harvestcraft:berrygardenItem"
  205.     right[38][#right[38] + 1] = "harvestcraft:blueberryItem"
  206.     right[38][#right[38] + 1] = "harvestcraft:tealeafItem"
  207.     right[38][#right[38] + 1] = "harvestcraft:sweetpotatoItem"
  208.     right[38][#right[38] + 1] = "harvestcraft:strawberryItem"
  209.     right[38][#right[38] + 1] = "harvestcraft:spiceleafItem"
  210.     right[38][#right[38] + 1] = "harvestcraft:ediblerootItem"
  211.     right[38][#right[38] + 1] = "harvestcraft:curryleafItem"
  212.     right[38][#right[38] + 1] = "harvestcraft:brusselsproutItem"
  213.     right[38][#right[38] + 1] = "harvestcraft:broccoliItem"
  214.     right[38][#right[38] + 1] = "harvestcraft:bellpepperItem"
  215.     right[38][#right[38] + 1] = "harvestcraft:soybeanItem"
  216.     right[38][#right[38] + 1] = "harvestcraft:spinachItem"
  217.     right[38][#right[38] + 1] = "harvestcraft:freshmilkItem"
  218.     right[38][#right[38] + 1] = "harvestcraft:coffeebeanItem"
  219.     right[38][#right[38] + 1] = "harvestcraft:tomatoItem"
  220.     right[38][#right[38] + 1] = "harvestcraft:parsnipItem"
  221.     right[38][#right[38] + 1] = "harvestcraft:turnipItem"
  222.     right[38][#right[38] + 1] = "harvestcraft:whitemushroomItem"
  223.     right[38][#right[38] + 1] = "harvestcraft:delightedmealItem"
  224.     right[38][#right[38] + 1] = "harvestcraft:grilledmushroomItem"
  225.     right[39][#right[39] + 1] = "harvestcraft:cottonItem"
  226.     right[39][#right[39] + 1] = "harvestcraft:coffeeItem"
  227.     right[39][#right[39] + 1] = "harvestcraft:cashewItem"
  228.     right[39][#right[39] + 1] = "harvestcraft:sink"
  229.     right[39][#right[39] + 1] = "harvestcraft:saltItem"
  230.     right[39][#right[39] + 1] = "harvestcraft:salt"
  231.     right[39][#right[39] + 1] = "harvestcraft:honeyItem"
  232.     right[39][#right[39] + 1] = "harvestcraft:beeswaxItem"
  233.     right[39][#right[39] + 1] = "harvestcraft:juicerItem"
  234.     right[39][#right[39] + 1] = "harvestcraft:saucepanItem"
  235.     right[39][#right[39] + 1] = "harvestcraft:grainbaitItem"
  236.     right[39][#right[39] + 1] = "harvestcraft:firmtofuItem"
  237.     right[39][#right[39] + 1] = "harvestcraft:soymilkItem"
  238.     right[39][#right[39] + 1] = "harvestcraft:stockItem"
  239.     right[39][#right[39] + 1] = "harvestcraft:silkentofuItem"
  240.     right[39][#right[39] + 1] = "harvestcraft:baconcheeseburgerItem"
  241.     right[39][#right[39] + 1] = "harvestcraft:plainyogurtItem"
  242.     right[39][#right[39] + 1] = "harvestcraft:toastItem"
  243.     right[40][#right[40] + 1] = "harvestcraft:appleyogurtItem"
  244.     right[40][#right[40] + 1] = "harvestcraft:carrotsoupItem"
  245.     right[40][#right[40] + 1] = "minecraft:baked_potato"
  246.     right[40][#right[40] + 1] = "minecraft:mushroom_stew"
  247.     right[41][#right[41] + 1] = "minecraft:potato"
  248.     right[41][#right[41] + 1] = "minecraft:carrot"
  249.     right[41][#right[41] + 1] = "minecraft:melon"
  250.     right[42][#right[42] + 1] = "minecraft:feather"
  251.     right[43][#right[43] + 1] = "minecraft:string"
  252.     right[44][#right[44] + 1] = "minecraft:cooked_beef"
  253.     right[44][#right[44] + 1] = "minecraft:cooked_chicken"
  254.     right[44][#right[44] + 1] = "minecraft:cooked_fished"
  255.     right[44][#right[44] + 1] = "minecraft:cooked_porkchop"
  256.     right[44][#right[44] + 1] = "minecraft:egg"
  257.     right[44][#right[44] + 1] = "minecraft:beef"
  258.     right[44][#right[44] + 1] = "minecraft:chicken"
  259.     right[44][#right[44] + 1] = "harvestcraft:muttonrawItem"
  260.     right[44][#right[44] + 1] = "harvestcraft:calamarirawItem"
  261.     right[44][#right[44] + 1] = "minecraft:porkchop"
  262.     right[44][#right[44] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodMeat"
  263.     right[44][#right[44] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodMeatMorsel"
  264.     right[44][#right[44] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.FoodWitherMeat"
  265.     right[44][#right[44] + 1] = "TConstruct:jerky,7"
  266.     right[44][#right[44] + 1] = "TConstruct:jerky,6"
  267.     right[45][#right[45] + 1] = "minecraft:record_13"
  268.     right[45][#right[45] + 1] = "minecraft:record_cat"
  269.     right[45][#right[45] + 1] = "minecraft:record_wait"
  270.     right[45][#right[45] + 1] = "NuclearCraft:recordPractice"
  271.     right[45][#right[45] + 1] = "NuclearCraft:recordArea51"
  272.     right[45][#right[45] + 1] = "NuclearCraft:recordNeighborhood"
  273.     right[46][#right[46] + 1] = "ExtraUtilities:drum"
  274.     right[47][#right[47] + 1] = "minechem:minechemBlueprint"
  275.     right[47][#right[47] + 1] = "minechem:tile.blueprintProjector"
  276.     right[47][#right[47] + 1] = "minechem:tile.chemicalDecomposer"
  277.     right[47][#right[47] + 1] = "minechem:tile.fusionWall"
  278.     right[47][#right[47] + 1] = "minechem:tile.chemicalSynthesizer"
  279.     right[48][#right[48] + 1] = "minechem:minechemElement"
  280.     right[48][#right[48] + 1] = "minechem:minechemMolecule"
  281.     right[49][#right[49] + 1] = "tc:minecartCaboose3"
  282.     right[49][#right[49] + 1] = "tc:minecartChest"
  283.     right[50][#right[50] + 1] = "ThermalFoundation:material,2"
  284.     right[51][#right[51] + 1] = "tc:rawPlastic"
  285.     right[52][#right[52] + 1] = "TConstruct:materials,16"
  286.     right[53][#right[53] + 1] = "tc:firebox"
  287.     right[53][#right[53] + 1] = "tc:graphite"
  288.     right[53][#right[53] + 1] = "tc:bridgePillar"
  289.     right[53][#right[53] + 1] = "tc:copperWireFine"
  290.     right[53][#right[53] + 1] = "tc:tcRailMediumStraight"
  291.     right[53][#right[53] + 1] = "tc:tcRailMediumSwitch"
  292.     right[53][#right[53] + 1] = "tc:tcRailMediumTurn"
  293.     right[53][#right[53] + 1] = "tc:tcRailLongStraight"
  294.     right[54][#right[54] + 1] = "ProjRed|Exploration:projectred.exploration.stone,2"
  295.     right[57][#right[57] + 1] = "minecraft:lava_bucket"
  296.     right[57][#right[57] + 1] = "minecraft:milk_bucket"
  297.     right[57][#right[57] + 1] = "minecraft:water_bucket"
  298.     right[57][#right[57] + 1] = "minecraft:bucket"
  299.     right[58][#right[58] + 1] = "OpenBlocks:xpdrain"
  300.     right[71][#right[71] + 1] = "minecraft:poisonous_potato"
  301.     right[71][#right[71] + 1] = "NuclearCraft:dominoes"
  302.     right[71][#right[71] + 1] = "NuclearCraft:ricecake"
  303.     right[71][#right[71] + 1] = "NuclearCraft:fishAndRicecake"
  304.     right[71][#right[71] + 1] = "GalacticraftCore:unlitTorchLit"
  305.     return right
  306. end
  307.  
  308. function get_item_list_left()
  309.     local right = {}
  310.     local i = 1
  311.  
  312.     while i <= LENTH_MAX do
  313.         right[i] = {}
  314.         i = i + 1
  315.     end
  316.     right[1][#right[1] + 1] = "minecraft:wooden_slab"
  317.     right[1][#right[1] + 1] = "minecraft:stone_slab"
  318.     right[1][#right[1] + 1] = "minecraft:birch_stairs"
  319.     right[1][#right[1] + 1] = "minecraft:spruce_stairs"
  320.     right[1][#right[1] + 1] = "minecraft:stone_stairs"
  321.     right[1][#right[1] + 1] = "minecraft:brick_stairs"
  322.     right[1][#right[1] + 1] = "minecraft:sandstone_stairs"
  323.     right[1][#right[1] + 1] = "minecraft:carpet"
  324.     right[1][#right[1] + 1] = "minecraft:oak_stairs"
  325.     right[1][#right[1] + 1] = "minecraft:nether_brick_stairs"
  326.     right[1][#right[1] + 1] = "minecraft:quartz_stairs"
  327.     right[2][#right[2] + 1] = "minecraft:birch_fence"
  328.     right[2][#right[2] + 1] = "minecraft:fence_gate"
  329.     right[2][#right[2] + 1] = "minecraft:oak_fence"
  330.     right[2][#right[2] + 1] = "minecraft:nether_brick_fence"
  331.     right[2][#right[2] + 1] = "minecraft:spruce_fence"
  332.     right[2][#right[2] + 1] = "minecraft:jungle_fence"
  333.     right[2][#right[2] + 1] = "minecraft:dark_oak_fence"
  334.     right[2][#right[2] + 1] = "minecraft:acacia_fence"
  335.     right[2][#right[2] + 1] = "minecraft:birch_fence_gate"
  336.     right[2][#right[2] + 1] = "minecraft:oak_fence_gate"
  337.     right[2][#right[2] + 1] = "minecraft:spruce_fence_gate"
  338.     right[2][#right[2] + 1] = "minecraft:jungle_fence_gate"
  339.     right[2][#right[2] + 1] = "minecraft:dark_oak_fence_gate"
  340.     right[2][#right[2] + 1] = "minecraft:acacia_fence_gate"
  341.     right[2][#right[2] + 1] = "minecraft:cobblestone_wall"
  342.     right[2][#right[2] + 1] = "minecraft:iron_bars"
  343.     right[2][#right[2] + 1] = "minecraft:stained_glass_pane"
  344.     right[2][#right[2] + 1] = "minecraft:glass_pane"
  345.     right[2][#right[2] + 1] = "minecraft:fence"
  346.     right[3][#right[3] + 1] = "minecraft:flint"
  347.     right[4][#right[4] + 1] = "minecraft:sandstone"
  348.     right[5][#right[5] + 1] = "ImmibisPeripherals:lanwire"
  349.     right[5][#right[5] + 1] = "OpenBlocks:technicolorGlasses"
  350.     right[5][#right[5] + 1] = "ComputerCraft:CC-TurtleAdvanced"
  351.     right[5][#right[5] + 1] = "ComputerCraft:CC-Turtle"
  352.     right[5][#right[5] + 1] = "ComputerCraft:treasureDisk"
  353.     right[5][#right[5] + 1] = "ComputerCraft:CC-Computer"
  354.     right[5][#right[5] + 1] = "ComputerCraft:CC-Peripheral"
  355.     right[5][#right[5] + 1] = "ComputerCraft:disk"
  356.     right[5][#right[5] + 1] = "ComputerCraft:advanced_modem"
  357.     right[5][#right[5] + 1] = "ComputerCraft:CC-Cable"
  358.     right[5][#right[5] + 1] = "ComputerCraft:pocketComputer"
  359.     right[5][#right[5] + 1] = "ComputerCraft:CC-TurtleExpanded"
  360.     right[5][#right[5] + 1] = "PeripheralsPlusPlus:rfCharger"
  361.     right[5][#right[5] + 1] = "PeripheralsPlusPlus:oreDictionary"
  362.     right[5][#right[5] + 1] = "SGCraft:sgCoreCrystal"
  363.     right[5][#right[5] + 1] = "SGCraft:sgControllerCrystal"
  364.     right[5][#right[5] + 1] = "SGCraft:naquadah"
  365.     right[5][#right[5] + 1] = "SGCraft:ccInterface"
  366.     right[5][#right[5] + 1] = "SGCraft:rfPowerUnit"
  367.     right[5][#right[5] + 1] = "SGCraft:sgIrisUpgrade"
  368.     right[5][#right[5] + 1] = "SGCraft:stargateController"
  369.     right[5][#right[5] + 1] = "SGCraft:stargateRing"
  370.     right[5][#right[5] + 1] = "SGCraft:sgChevronUpgrade"
  371.     right[5][#right[5] + 1] = "SGCraft:stargateBase"
  372.     right[5][#right[5] + 1] = "BuildCraft|Core:engineBlock"
  373.     right[5][#right[5] + 1] = "BuildCraft|Factory:pumpBlock"
  374.     right[5][#right[5] + 1] = "ChickenChunks:chickenChunkLoader"
  375.     right[6][#right[6] + 1] = "OpenComputers:material"
  376.     right[6][#right[6] + 1] = "OpenComputers:geolyzer"
  377.     right[6][#right[6] + 1] = "OpenComputers:card"
  378.     right[6][#right[6] + 1] = "OpenComputers:component"
  379.     right[6][#right[6] + 1] = "OpenComputers:tool"
  380.     right[6][#right[6] + 1] = "OpenComputers:storage"
  381.     right[6][#right[6] + 1] = "OpenComputers:print"
  382.     right[6][#right[6] + 1] = "OpenComputers:cable"
  383.     right[6][#right[6] + 1] = "OpenComputers:case1"
  384.     right[6][#right[6] + 1] = "OpenComputers:diskDrive"
  385.     right[6][#right[6] + 1] = "OpenComputers:case2"
  386.     right[6][#right[6] + 1] = "OpenComputers:case3"
  387.     right[6][#right[6] + 1] = "OpenComputers:disassembler"
  388.     right[6][#right[6] + 1] = "OpenComputers:screen1"
  389.     right[6][#right[6] + 1] = "OpenComputers:screen2"
  390.     right[6][#right[6] + 1] = "OpenComputers:screen3"
  391.     right[6][#right[6] + 1] = "OpenComputers:keyboard"
  392.     right[6][#right[6] + 1] = "OpenComputers:upgrade"
  393.     right[6][#right[6] + 1] = "OpenComputers:robot"
  394.     right[6][#right[6] + 1] = "OpenComputers:motionSensor"
  395.     right[6][#right[6] + 1] = "OpenComputers:wrench"
  396.     right[6][#right[6] + 1] = "OpenComputers:item"
  397.     right[6][#right[6] + 1] = "OpenComputers:eeprom"
  398.     right[6][#right[6] + 1] = "OpenComputers:charger"
  399.     right[6][#right[6] + 1] = "OpenComputers:assembler"
  400.     right[6][#right[6] + 1] = "OpenComputers:printer"
  401.     right[7][#right[7] + 1] = "minecraft:potion"
  402.     right[7][#right[7] + 1] = "minecraft:sugar"
  403.     right[7][#right[7] + 1] = "minecraft:nether_wart"
  404.     right[7][#right[7] + 1] = "minecraft:fish,3"
  405.     right[7][#right[7] + 1] = "minecraft:magma_cream"
  406.     right[7][#right[7] + 1] = "minecraft:glass_bottle"
  407.     right[7][#right[7] + 1] = "minecraft:blaze_rod"
  408.     right[7][#right[7] + 1] = "minecraft:nether_star"
  409.     right[7][#right[7] + 1] = "minecraft:fire_charge"
  410.     right[7][#right[7] + 1] = "ThermalFoundation:material,513"
  411.     right[7][#right[7] + 1] = "ThermalFoundation:material,1024"
  412.     right[7][#right[7] + 1] = "ThermalFoundation:material,1025"
  413.     right[7][#right[7] + 1] = "ThermalFoundation:material,1026"
  414.     right[7][#right[7] + 1] = "minecraft:blaze_powder"
  415.     right[7][#right[7] + 1] = "minecraft:spider_eye"
  416.     right[7][#right[7] + 1] = "minecraft:brewing_stand"
  417.     right[7][#right[7] + 1] = "minecraft:fermented_spider_eye"
  418.     right[7][#right[7] + 1] = "minecraft:golden_apple"
  419.     right[7][#right[7] + 1] = "minecraft:speckled_melon"
  420.     right[7][#right[7] + 1] = "minecraft:ender_eye"
  421.     right[8][#right[8] + 1] = "minecraft:anvil"
  422.     right[8][#right[8] + 1] = "minecraft:hopper"
  423.     right[8][#right[8] + 1] = "minecraft:chest"
  424.     right[8][#right[8] + 1] = "minecraft:bed"
  425.     right[8][#right[8] + 1] = "minecraft:item_frame"
  426.     right[8][#right[8] + 1] = "IronChest:BlockIronChest"
  427.     right[8][#right[8] + 1] = "minecraft:repeater"
  428.     right[8][#right[8] + 1] = "minecraft:torch"
  429.     right[8][#right[8] + 1] = "TConstruct:decoration.stonetorch"
  430.     right[8][#right[8] + 1] = "minecraft:redstone_lamp"
  431.     right[8][#right[8] + 1] = "minecraft:piston"
  432.     right[8][#right[8] + 1] = "minecraft:sticky_piston"
  433.     right[8][#right[8] + 1] = "minecraft:tripwire_hook"
  434.     right[8][#right[8] + 1] = "minecraft:rail"
  435.     right[8][#right[8] + 1] = "minecraft:golden_rail"
  436.     right[8][#right[8] + 1] = "minecraft:birch_door"
  437.     right[8][#right[8] + 1] = "minecraft:oak_door"
  438.     right[8][#right[8] + 1] = "minecraft:spruce_door"
  439.     right[8][#right[8] + 1] = "minecraft:jungle_door"
  440.     right[8][#right[8] + 1] = "minecraft:dark_oak_door"
  441.     right[8][#right[8] + 1] = "minecraft:acacia_door"
  442.     right[8][#right[8] + 1] = "minecraft:wooden_door"
  443.     right[8][#right[8] + 1] = "minecraft:redstone_torch"
  444.     right[8][#right[8] + 1] = "minecraft:dispenser"
  445.     right[8][#right[8] + 1] = "minecraft:furnace"
  446.     right[8][#right[8] + 1] = "minecraft:crafting_table"
  447.     right[8][#right[8] + 1] = "minecraft:trapped_chest"
  448.     right[8][#right[8] + 1] = "minecraft:dropper"
  449.     right[8][#right[8] + 1] = "minecraft:trapdoor"
  450.     right[8][#right[8] + 1] = "minecraft:stone_button"
  451.     right[8][#right[8] + 1] = "minecraft:wooden_pressure_plate"
  452.     right[8][#right[8] + 1] = "minecraft:stone_pressure_plate"
  453.     right[8][#right[8] + 1] = "minecraft:lever"
  454.     right[8][#right[8] + 1] = "ironchest:BlockIronChest"
  455.     right[8][#right[8] + 1] = "minecraft:activator_rail"
  456.     right[8][#right[8] + 1] = "minecraft:wooden_button"
  457.     right[8][#right[8] + 1] = "minecraft:comparator"
  458.     right[8][#right[8] + 1] = "ironchest:BlockIronChest"
  459.     right[8][#right[8] + 1] = "minecraft:enchanting_table"
  460.     right[8][#right[8] + 1] = "minecraft:ender_chest"
  461.     right[8][#right[8] + 1] = "randomutilities:displayTable"
  462.     right[8][#right[8] + 1] = "minecraft:iron_door"
  463.     right[8][#right[8] + 1] = "minecraft:ladder"
  464.     right[8][#right[8] + 1] = "TConstruct:decoration.stoneladder"
  465.     right[8][#right[8] + 1] = "EnderStorage:enderChest"
  466.     right[8][#right[8] + 1] = "ExtraUtilities:trashcan"
  467.     right[8][#right[8] + 1] = "harvestcraft:sink"
  468.     right[9][#right[9] + 1] = "minecraft:stonebrick"
  469.     right[9][#right[9] + 1] = "minecraft:stone_brick_stairs"
  470.     right[10][#right[10] + 1] = "minecraft:planks"
  471.     right[10][#right[10] + 1] = "minecraft:stick"
  472.     right[10][#right[10] + 1] = "minecraft:sign"
  473.     right[10][#right[10] + 1] = "TConstruct:toolRod"
  474.     right[11][#right[11] + 1] = "minecraft:redstone"
  475.     right[12][#right[12] + 1] = "minecraft:redstone_block"
  476.     right[13][#right[13] + 1] = "minecraft:coal,0"
  477.     right[14][#right[14] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.MiscSoulFiery"
  478.     right[14][#right[14] + 1] = "GrimoireOfGaia:item.GrimoireOfGaia.Shard"
  479.     right[14][#right[14] + 1] = "TConstruct:oreBerries,0"
  480.     right[14][#right[14] + 1] = "TConstruct:oreBerries,1"
  481.     right[14][#right[14] + 1] = "TConstruct:oreBerries,2"
  482.     right[14][#right[14] + 1] = "TConstruct:oreBerries,3"
  483.     right[14][#right[14] + 1] = "TConstruct:oreBerries,4"
  484.     right[14][#right[14] + 1] = "minecraft:gold_nugget"
  485.     right[14][#right[14] + 1] = "TConstruct:materials,24"
  486.     right[14][#right[14] + 1] = "ThermalFoundation:material,98"
  487.     right[14][#right[14] + 1] = "TConstruct:materials,19"
  488.     right[15][#right[15] + 1] = "minecraft:coal"
  489.     right[16][#right[16] + 1] = "BuildCraft|Silicon:laserBlock"
  490.     right[16][#right[16] + 1] = "BuildCraft|Silicon:laserTableBlock"
  491.     right[16][#right[16] + 1] = "BuildCraft|Transport:item.buildcraftPipe.pipeitemsgold"
  492.     right[16][#right[16] + 1] = "BuildCraft|Transport:item.buildcraftPipe.pipepoweremerald"
  493.     right[16][#right[16] + 1] = "BuildCraft|Transport:item.buildcraftPipe.pipepowerdiamond"
  494.     right[16][#right[16] + 1] = "BuildCraft|Transport:item.buildcraftPipe.pipepowergold"
  495.     right[16][#right[16] + 1] = "BuildCraft|Transport:item.buildcraftPipe.pipestructurecobblestone"
  496.     right[16][#right[16] + 1] = "BuildCraft|Transport:pipePowerAdapter"
  497.     right[16][#right[16] + 1] = "BuildCraft|Factory:tankBlock"
  498.     right[16][#right[16] + 1] = "BuildCraft|Transport:pipeFacade"
  499.     right[17][#right[17] + 1] = "TConstruct:slime.gel"
  500.     right[17][#right[17] + 1] = "TConstruct:strangeFood"
  501.     right[17][#right[17] + 1] = "minecraft:slime_ball"
  502.     right[18][#right[18] + 1] = "minecraft:leather_helmet"
  503.     right[18][#right[18] + 1] = "minecraft:leather_chestplate"
  504.     right[18][#right[18] + 1] = "minecraft:leather_leggings"
  505.     right[18][#right[18] + 1] = "minecraft:leather_boots"
  506.     right[18][#right[18] + 1] = "minecraft:chainmail_helmet"
  507.     right[18][#right[18] + 1] = "minecraft:chainmail_chestplate"
  508.     right[18][#right[18] + 1] = "minecraft:chainmail_leggings"
  509.     right[18][#right[18] + 1] = "minecraft:chainmail_boots"
  510.     right[18][#right[18] + 1] = "minecraft:iron_helmet"
  511.     right[18][#right[18] + 1] = "minecraft:iron_chestplate"
  512.     right[18][#right[18] + 1] = "minecraft:iron_leggings"
  513.     right[18][#right[18] + 1] = "minecraft:iron_boots"
  514.     right[18][#right[18] + 1] = "minecraft:diamond_helmet"
  515.     right[18][#right[18] + 1] = "minecraft:diamond_chestplate"
  516.     right[18][#right[18] + 1] = "minecraft:diamond_leggings"
  517.     right[18][#right[18] + 1] = "minecraft:diamond_boots"
  518.     right[18][#right[18] + 1] = "minecraft:golden_helmet"
  519.     right[18][#right[18] + 1] = "minecraft:golden_chestplate"
  520.     right[18][#right[18] + 1] = "minecraft:golden_leggings"
  521.     right[18][#right[18] + 1] = "minecraft:golden_boots"
  522.     right[18][#right[18] + 1] = "minecraft:iron_horse_armor"
  523.     right[18][#right[18] + 1] = "minecraft:golden_horse_armor"
  524.     right[18][#right[18] + 1] = "minecraft:diamond_horse_armor"
  525.     right[18][#right[18] + 1] = "ThermalFoundation:armor.helmetBronze"
  526.     right[18][#right[18] + 1] = "ThermalFoundation:armor.bootsBronze"
  527.     right[18][#right[18] + 1] = "ThermalFoundation:armor.helmetBronze"
  528.     right[18][#right[18] + 1] = "ThermalFoundation:armor.legsBronze"
  529.     right[18][#right[18] + 1] = "ThermalFoundation:armor.plateBronze"
  530.     right[18][#right[18] + 1] = "GalaxySpace:item.spacesuit_helmet"
  531.     right[18][#right[18] + 1] = "GalaxySpace:item.spacesuit_plate"
  532.     right[18][#right[18] + 1] = "GalaxySpace:item.spacesuit_leg"
  533.     right[18][#right[18] + 1] = "GalaxySpace:item.spacesuit_boots"
  534.     right[18][#right[18] + 1] = "randomutilities:heartCanister"
  535.     right[18][#right[18] + 1] = "TConstruct:heartCanister"
  536.     right[18][#right[18] + 1] = "ProjRed|Exploration:projectred.exploration.sapphirechestplate"
  537.     right[18][#right[18] + 1] = "ProjRed|Exploration:projectred.exploration.rubychestplate"
  538.     right[18][#right[18] + 1] = "ProjRed|Exploration:projectred.exploration.rubyboots"
  539.     right[18][#right[18] + 1] = "NuclearCraft:dUBoots"
  540.     right[18][#right[18] + 1] = "NuclearCraft:dULegs"
  541.     right[18][#right[18] + 1] = "NuclearCraft:dUHelm"
  542.     right[18][#right[18] + 1] = "NuclearCraft:dUChest"
  543.     right[18][#right[18] + 1] = "NuclearCraft:toughBoots"
  544.     right[18][#right[18] + 1] = "NuclearCraft:toughLegs"
  545.     right[18][#right[18] + 1] = "NuclearCraft:toughHelm"
  546.     right[18][#right[18] + 1] = "NuclearCraft:toughChest"
  547.     right[19][#right[19] + 1] = "EnderStorage:enderPouch"
  548.     right[19][#right[19] + 1] = "ExtraUtilities:golden_lasso"
  549.     right[19][#right[19] + 1] = "ExtraUtilities:watering_can"
  550.     right[19][#right[19] + 1] = "minecraft:wooden_shovel"
  551.     right[19][#right[19] + 1] = "minecraft:wooden_pickaxe"
  552.     right[19][#right[19] + 1] = "minecraft:wooden_axe"
  553.     right[19][#right[19] + 1] = "minecraft:wooden_hoe"
  554.     right[19][#right[19] + 1] = "minecraft:stone_shovel"
  555.     right[19][#right[19] + 1] = "minecraft:stone_pickaxe"
  556.     right[19][#right[19] + 1] = "minecraft:stone_axe"
  557.     right[19][#right[19] + 1] = "minecraft:stone_hoe"
  558.     right[19][#right[19] + 1] = "minecraft:iron_shovel"
  559.     right[19][#right[19] + 1] = "minecraft:iron_pickaxe"
  560.     right[19][#right[19] + 1] = "minecraft:iron_axe"
  561.     right[19][#right[19] + 1] = "minecraft:iron_hoe"
  562.     right[19][#right[19] + 1] = "minecraft:golden_shovel"
  563.     right[19][#right[19] + 1] = "minecraft:golden_pickaxe"
  564.     right[19][#right[19] + 1] = "minecraft:golden_axe"
  565.     right[19][#right[19] + 1] = "minecraft:golden_hoe"
  566.     right[19][#right[19] + 1] = "minecraft:diamond_shovel"
  567.     right[19][#right[19] + 1] = "minecraft:diamond_pickaxe"
  568.     right[19][#right[19] + 1] = "minecraft:diamond_axe"
  569.     right[19][#right[19] + 1] = "minecraft:diamond_hoe"
  570.     right[19][#right[19] + 1] = "minecraft:shears"
  571.     right[19][#right[19] + 1] = "minecraft:boat"
  572.     right[19][#right[19] + 1] = "minechem:minechemPolytool"
  573.     right[19][#right[19] + 1] = "ExtraUtilities:builderswand"
  574.     right[19][#right[19] + 1] = "ThermalExpansion:wrench"
  575.     right[19][#right[19] + 1] = "ThermalFoundation:tool.shearsWood"
  576.     right[19][#right[19] + 1] = "TConstruct:hammer"
  577.     right[19][#right[19] + 1] = "TConstruct:excavator"
  578.     right[19][#right[19] + 1] = "TConstruct:lumberaxe"
  579.     right[19][#right[19] + 1] = "TConstruct:pickaxe"
  580.     right[19][#right[19] + 1] = "TConstruct:shovel"
  581.     right[19][#right[19] + 1] = "minecraft:flint_and_steel"
  582.     right[19][#right[19] + 1] = "minecraft:fishing_rod"
  583.     right[19][#right[19] + 1] = "minecraft:lead"
  584.     right[19][#right[19] + 1] = "minecraft:minecart"
  585.     right[19][#right[19] + 1] = "minecraft:experience_bottle"
  586.     right[19][#right[19] + 1] = "minecraft:compass"
  587.     right[19][#right[19] + 1] = "minecraft:clock"
  588.     right[19][#right[19] + 1] = "chisel:chisel"
  589.     right[19][#right[19] + 1] = "harvestcraft:mixingbowlItem"
  590.     right[19][#right[19] + 1] = "harvestcraft:potItem"
  591.     right[19][#right[19] + 1] = "ProjRed|Exploration:projectred.exploration.sawsapphire"
  592.     right[19][#right[19] + 1] = "ExtraUtilities:destructionpickaxe"
  593.     right[19][#right[19] + 1] = "ExtraUtilities:erosionShovel"
  594.     right[19][#right[19] + 1] = "ThermalFoundation:tool.hoeBronze"
  595.     right[20][#right[20] + 1] = "minecraft:wooden_sword"
  596.     right[20][#right[20] + 1] = "minecraft:stone_sword"
  597.     right[20][#right[20] + 1] = "minecraft:iron_sword"
  598.     right[20][#right[20] + 1] = "minecraft:golden_sword"
  599.     right[20][#right[20] + 1] = "minecraft:diamond_sword"
  600.     right[20][#right[20] + 1] = "ThermalFoundation:tool.swordBronze"
  601.     right[20][#right[20] + 1] = "TConstruct:longsword"
  602.     right[20][#right[20] + 1] = "minecraft:bow"
  603.     right[20][#right[20] + 1] = "minecraft:arrow"
  604.     right[20][#right[20] + 1] = "TConstruct:Shuriken"
  605.     right[20][#right[20] + 1] = "NuclearCraft:toughBow"
  606.     right[21][#right[21] + 1] = "ExtraUtilities:generator"
  607.     right[21][#right[21] + 1] = "ExtraUtilities:generator.8"
  608.     right[21][#right[21] + 1] = "ExtraUtilities:divisionSigil"
  609.     right[21][#right[21] + 1] = "ExtraUtilities:bedrockiumIngot"
  610.     right[21][#right[21] + 1] = "ExtraUtilities:decorativeBlock1"
  611.     right[21][#right[21] + 1] = "ExtraUtilities:nodeUpgrade"
  612.     right[21][#right[21] + 1] = "ExtraUtilities:pipes"
  613.     right[21][#right[21] + 1] = "ExtraUtilities:extractor_base"
  614.     right[21][#right[21] + 1] = "ExtraUtilities:Tank"
  615.     right[21][#right[21] + 1] = "ExtraUtilities:timer"
  616.     right[22][#right[22] + 1] = "ThermalExpansion:Device"
  617.     right[22][#right[22] + 1] = "ThermalExpansion:Glass"
  618.     right[22][#right[22] + 1] = "ThermalDynamics:ThermalDynamics_0"
  619.     right[22][#right[22] + 1] = "ThermalDynamics:ThermalDynamics_16"
  620.     right[22][#right[22] + 1] = "ThermalDynamics:ThermalDynamics_32"
  621.     right[22][#right[22] + 1] = "ThermalDynamics:servo"
  622.     right[22][#right[22] + 1] = "ThermalExpansion:material,0"
  623.     right[22][#right[22] + 1] = "ThermalExpansion:Cell"
  624.     right[22][#right[22] + 1] = "ThermalExpansion:Frame"
  625.     right[22][#right[22] + 1] = "ThermalExpansion:Tank"
  626.     right[22][#right[22] + 1] = "ThermalExpansion:Tesseract"
  627.     right[22][#right[22] + 1] = "ThermalExpansion:augment"
  628.     right[22][#right[22] + 1] = "ThermalExpansion:material,16"
  629.     right[22][#right[22] + 1] = "ThermalExpansion:material,3"
  630.     right[22][#right[22] + 1] = "ThermalFoundation:material,512"
  631.     right[22][#right[22] + 1] = "ThermalFoundation:material,4"
  632.     right[22][#right[22] + 1] = "ThermalExpansion:Machine"
  633.     right[22][#right[22] + 1] = "ThermalDynamics:ThermalDynamics_64"
  634.     right[22][#right[22] + 1] = "ThermalDynamics:filter"
  635.     right[23][#right[23] + 1] = "minecraft:paper"
  636.     right[23][#right[23] + 1] = "minecraft:bookshelf"
  637.     right[23][#right[23] + 1] = "minecraft:book"
  638.     right[23][#right[23] + 1] = "minecraft:written_book"
  639.     right[23][#right[23] + 1] = "ComputerCraft:printout"
  640.     right[24][#right[24] + 1] = "minecraft:dye,4"
  641.     right[25][#right[25] + 1] = "minecraft:lapis_block"
  642.     right[26][#right[26] + 1] = "minecraft:gold_ore"
  643.     right[26][#right[26] + 1] = "minecraft:iron_ore"
  644.     right[26][#right[26] + 1] = "minecraft:coal_ore"
  645.     right[26][#right[26] + 1] = "minecraft:lapis_ore"
  646.     right[26][#right[26] + 1] = "minecraft:diamond_ore"
  647.     right[26][#right[26] + 1] = "minecraft:redstone_ore"
  648.     right[26][#right[26] + 1] = "minecraft:emerald_ore"
  649.     right[26][#right[26] + 1] = "minecraft:quartz_ore"
  650.     right[27][#right[27] + 1] = "TConstruct:SearedBrick,1"
  651.     right[27][#right[27] + 1] = "TConstruct:SearedBrick,2"
  652.     right[27][#right[27] + 1] = "TConstruct:SearedBrick,3"
  653.     right[27][#right[27] + 1] = "TConstruct:SearedBrick,4"
  654.     right[27][#right[27] + 1] = "TConstruct:SearedBrick,5"
  655.     right[27][#right[27] + 1] = "ThermalFoundation:Ore"
  656.     right[27][#right[27] + 1] = "TConstruct:GravelOre"
  657.     right[27][#right[27] + 1] = "tc:oreTC,0"
  658.     right[27][#right[27] + 1] = "GalacticraftMars:tile.mars,0"
  659.     right[27][#right[27] + 1] = "GalacticraftMars:tile.mars,2"
  660.     right[27][#right[27] + 1] = "qCraft:quantumore"
  661.     right[27][#right[27] + 1] = "NuclearCraft:blockOre"
  662.     right[27][#right[27] + 1] = "GalacticraftCore:tile.gcBlockCore,5"
  663.     right[27][#right[27] + 1] = "GalacticraftCore:tile.gcBlockCore,6"
  664.     right[27][#right[27] + 1] = "GalacticraftCore:tile.gcBlockCore,7"
  665.     right[27][#right[27] + 1] = "GalaxySpace:ores"
  666.     right[27][#right[27] + 1] = "ProjRed|Exploration:projectred.exploration.ore"
  667.     right[27][#right[27] + 1] = "SGCraft:naquadahOre"
  668.     right[28][#right[28] + 1] = "TConstruct:ore.berries.two"
  669.     right[28][#right[28] + 1] = "TConstruct:ore.berries.one"
  670.     right[29][#right[29] + 1] = "ExtraUtilities:cobblestone_compressed"
  671.     right[30][#right[30] + 1] = "minecraft:coal_block"
  672.     right[31][#right[31] + 1] = "TConstruct:oreBerries,5"
  673.     right[32][#right[32] + 1] = "qCraft:dust"
  674.     right[33][#right[33] + 1] = "ProjRed|Core:projectred.core.part,37" -- Ruby
  675.     right[33][#right[33] + 1] = "ProjRed|Core:projectred.core.part,38" -- Saphire
  676.     right[33][#right[33] + 1] = "ProjRed|Core:projectred.core.part,39" -- Peridot
  677.     right[34][#right[34] + 1] = "ProjRed|Core:projectred.core.part,56" -- Electrotine
  678.     right[35][#right[35] + 1] = "minecraft:quartz_block"
  679.     right[36][#right[36] + 1] = "minecraft:netherrack"
  680.     right[37][#right[37] + 1] = "minecraft:end_stone"
  681.     right[38][#right[38] + 1] = "minecraft:obsidian"
  682.     right[39][#right[39] + 1] = "minecraft:iron_block"
  683.     right[40][#right[40] + 1] = "minecraft:sapling"
  684.     right[40][#right[40] + 1] = "minecraft:flower"
  685.     right[40][#right[40] + 1] = "minecraft:fern"
  686.     right[40][#right[40] + 1] = "minecraft:leaves"
  687.     right[40][#right[40] + 1] = "minecraft:dead_bush"
  688.     right[40][#right[40] + 1] = "minecraft:waterlily"
  689.     right[40][#right[40] + 1] = "minecraft:cactus"
  690.     right[40][#right[40] + 1] = "minecraft:red_mushroom"
  691.     right[40][#right[40] + 1] = "minecraft:lily_pad"
  692.     right[40][#right[40] + 1] = "minecraft:vines"
  693.     right[40][#right[40] + 1] = "minecraft:red_flower"
  694.     right[40][#right[40] + 1] = "minecraft:brown_mushroom"
  695.     right[40][#right[40] + 1] = "minecraft:yellow_flower"
  696.     right[40][#right[40] + 1] = "minecraft:double_plant"
  697.     right[40][#right[40] + 1] = "TConstruct:slime.sapling"
  698.     right[41][#right[41] + 1] = "minecraft:clay"
  699.     right[41][#right[41] + 1] = "minecraft:clay_ball"
  700.     right[41][#right[41] + 1] = "minecraft:mossy_cobblestone"
  701.     right[41][#right[41] + 1] = "minecraft:brick_block"
  702.     right[41][#right[41] + 1] = "minecraft:brick"
  703.     right[42][#right[42] + 1] = "minecraft:nether_brick"
  704.     right[42][#right[42] + 1] = "minecraft:netherbrick"
  705.     right[43][#right[43] + 1] = "minecraft:quartz"
  706.     right[44][#right[44] + 1] = "minecraft:dye"
  707.     right[45][#right[45] + 1] = "minecraft:soul_sand"
  708.     right[46][#right[46] + 1] = "ForgeMicroblock:microblock"
  709.     right[46][#right[46] + 1] = "chisel:marble_pillar"
  710.     right[46][#right[46] + 1] = "chisel:holystone"
  711.     right[46][#right[46] + 1] = "chisel:iron_block"
  712.     right[46][#right[46] + 1] = "chisel:concrete"
  713.     right[46][#right[46] + 1] = "chisel:factoryblock"
  714.     right[46][#right[46] + 1] = "chisel:cobblestone"
  715.     right[46][#right[46] + 1] = "chisel:glass"
  716.     right[46][#right[46] + 1] = "minecraft:stained_glass"
  717.     right[47][#right[47] + 1] = "TConstruct:materials,2"
  718.     right[47][#right[47] + 1] = "TConstruct:materials,6"
  719.     right[47][#right[47] + 1] = "TConstruct:toolShard"
  720.     right[47][#right[47] + 1] = "TConstruct:swordBlade"
  721.     right[47][#right[47] + 1] = "TConstruct:excavatorHead"
  722.     right[47][#right[47] + 1] = "TConstruct:handGuard"
  723.     right[47][#right[47] + 1] = "TConstruct:CraftedSoil"
  724.     right[47][#right[47] + 1] = "TConstruct:Smeltery"
  725.     right[47][#right[47] + 1] = "TConstruct:blankPattern"
  726.     right[47][#right[47] + 1] = "TConstruct:Armor.DryingRack"
  727.     right[47][#right[47] + 1] = "TConstruct:trap.punji"
  728.     right[47][#right[47] + 1] = "TConstruct:manualBook"
  729.     right[47][#right[47] + 1] = "TConstruct:CraftingStation"
  730.     right[47][#right[47] + 1] = "TConstruct:ToolStationBlock"
  731.     right[47][#right[47] + 1] = "TConstruct:metalPattern"
  732.     right[48][#right[48] + 1] = "minechem:tile.oreUranium"
  733.     right[49][#right[49] + 1] = "tc:oreTC,2"
  734.     right[49][#right[49] + 1] = "tc:oreTC,1"
  735.     right[50][#right[50] + 1] = "minecraft:snow"
  736.     right[50][#right[50] + 1] = "minecraft:snowball"
  737.     right[51][#right[51] + 1] = "ThermalFoundation:material,16"
  738.     right[52][#right[52] + 1] = "ThermalFoundation:material,20"
  739.     right[53][#right[53] + 1] = "ThermalExpansion:material,515"
  740.     right[54][#right[54] + 1] = "ThermalFoundation:material,17"
  741.     right[55][#right[55] + 1] = "OpenBlocks:fan"
  742.     right[56][#right[56] + 1] = "NuclearCraft:parts"
  743.     right[56][#right[56] + 1] = "NuclearCraft:material"
  744.     right[56][#right[56] + 1] = "NuclearCraft:crusherIdle"
  745.     right[56][#right[56] + 1] = "NuclearCraft:upgradeEnergy"
  746.     right[56][#right[56] + 1] = "NuclearCraft:upgradeSpeed"
  747.     right[56][#right[56] + 1] = "NuclearCraft:machineBlockNC"
  748.     right[57][#right[57] + 1] = "NuclearCraft:fuel"
  749.     right[57][#right[57] + 1] = "NuclearCraft:material,24"
  750.     right[57][#right[57] + 1] = "NuclearCraft:material,26"
  751.     right[57][#right[57] + 1] = "NuclearCraft:material,27"
  752.     right[59][#right[59] + 1] = "GalacticraftCore:tile.aluminumWire"
  753.     right[59][#right[59] + 1] = "GalacticraftCore:item.basicItem"
  754.     right[59][#right[59] + 1] = "GalacticraftCore:tile.machine"
  755.     right[59][#right[59] + 1] = "GalacticraftCore:tile.canister"
  756.     right[59][#right[59] + 1] = "GalacticraftCore:item.canister"
  757.     right[59][#right[59] + 1] = "GalacticraftCore:item.fuelCanisterPartial"
  758.     right[59][#right[59] + 1] = "GalacticraftCore:item.oxygenConcentrator"
  759.     right[59][#right[59] + 1] = "GalacticraftCore:tile.oxygenPipe"
  760.     right[59][#right[59] + 1] = "GalacticraftCore:tile.oxygenCompressor"
  761.     right[59][#right[59] + 1] = "GalacticraftCore:tile.heavyPlating"
  762.     right[59][#right[59] + 1] = "GalacticraftMars:item.itemBasicAsteroids"
  763.     right[59][#right[59] + 1] = "GalacticraftCore:item.oxygenMask"
  764.     right[59][#right[59] + 1] = "GalacticraftCore:item.heavyPlating"
  765.     right[59][#right[59] + 1] = "GalacticraftCore:item.oxygenGear"
  766.     right[59][#right[59] + 1] = "GalacticraftCore:item.oxygenTankHeavyFull"
  767.     right[59][#right[59] + 1] = "GalacticraftCore:item.meteoricIronRaw"
  768.     right[59][#right[59] + 1] = "GalacticraftCore:item.meteoricIronIngot"
  769.     right[59][#right[59] + 1] = "GalacticraftCore:item.oilCanisterPartial"
  770.     right[59][#right[59] + 1] = "GalaxySpace:item.BasicItems"
  771.     right[59][#right[59] + 1] = "GalacticraftMars:item.null,0"
  772.     right[59][#right[59] + 1] = "GalacticraftMars:item.null,2"
  773.     right[59][#right[59] + 1] = "GalacticraftMars:item.schematic"
  774.     right[59][#right[59] + 1] = "GalacticraftMars:item.BasicItems,13"
  775.     right[59][#right[59] + 1] = "GalaxySpace:item.CompressedPlates"
  776.     right[60][#right[60] + 1] = "GalacticraftCore:tile.moonBlock"
  777.     right[60][#right[60] + 1] = "GalacticraftCore:item.cheeseCurd"
  778.     right[60][#right[60] + 1] = "GalacticraftCore:tile.glowstoneTorch"
  779.     right[60][#right[60] + 1] = "GalacticraftMars:tile.mars,4"
  780.     right[60][#right[60] + 1] = "GalacticraftMars:tile.mars,5"
  781.     right[60][#right[60] + 1] = "GalacticraftMars:tile.mars,6"
  782.     right[60][#right[60] + 1] = "GalacticraftMars:tile.mars,9"
  783.     right[62][#right[62] + 1] = "superMassiveTech:depletedNetherStar"
  784.  
  785.     return right
  786. end
  787.  
  788. --[[
  789. ----    FIND CHEST FUNCTIONS
  790. --]]
  791.  
  792. function get_info(chest_item)
  793.     local str
  794.     local name
  795.  
  796.     name, str = chest_item:match("([^,]+),([^,]+)")
  797.     if name then
  798.         return name, tonumber(str)
  799.     else
  800.         return chest_item, nil
  801.     end
  802. end
  803.  
  804. function get_item_list()
  805.     local chest = {}
  806.  
  807.     chest["left"] = get_item_list_left()
  808.     chest["right"] = get_item_list_right()
  809.     return chest
  810. end
  811.  
  812. function get_item_chest_id(side, item, damage)
  813.     local i
  814.     local meta
  815.     local damageRef
  816.     local bestCandidate
  817.     local name
  818.     local chest
  819.  
  820.     i = 1
  821.     meta = 1
  822.     name = true
  823.     chest = get_item_list()
  824.     if (side and side ~= "left" and side ~= "right") or not item or not side then
  825.         error("get_item_chest_id: Invalid side or nil item")
  826.     end
  827.     while chest[side][i] do
  828.         meta = 1
  829.         while chest[side][i][meta] do
  830.             name, damageRef = get_info(chest[side][i][meta])
  831.             if name == item and damageRef and damageRef == damage then
  832.                 return i
  833.             elseif name == item and not damageRef then
  834.                 bestCandidate = i
  835.             end
  836.             meta = meta + 1
  837.         end
  838.         i = i + 1
  839.     end
  840.     return bestCandidate
  841. end
  842.  
  843. function get_max_distance_side(side, max, data)
  844.     local tmp
  845.  
  846.     tmp = get_item_chest_id("left", data.name, data.damage)
  847.     if not tmp then
  848.         return LENTH_MAX
  849.     elseif tmp > max then
  850.         return tmp
  851.     end
  852.     return max
  853. end
  854.  
  855. function get_max_distance(inv_map)
  856.     local slot
  857.     local max_distance
  858.  
  859.     max_distance = 0
  860.     slot = robot.inventorySize()
  861.     while slot > 0 do
  862.         if inv_map[slot] then
  863.             max_distance = get_max_distance_side("left", max_distance, inv_map[slot])
  864.             max_distance = get_max_distance_side("right", max_distance, inv_map[slot])
  865.             if max_distance == LENTH_MAX then
  866.                 return LENTH_MAX
  867.             end
  868.         end
  869.         slot = slot - 1
  870.     end
  871.     return max_distance
  872. end
  873.  
  874. --[[
  875. ----    DELIVER FUNCTIONS
  876. --]]
  877.  
  878. function line(side, max_distance, inv_map)
  879.     local i
  880.  
  881.     i = 0
  882.     while i < max_distance do
  883.         if i > 0 then
  884.             move.move(1, side.front)
  885.         end
  886.         i = i + 1
  887.         if side == "right" then
  888.             put_under_chest(side, i, inv_map)
  889.         else
  890.             put_under_chest(side, max_distance - (i - 1), inv_map)
  891.         end
  892.     end
  893. end
  894.  
  895. function put_under_chest(side, chest_id, inv_map)
  896.     local tmp
  897.     local slot
  898.  
  899.     slot = robot.inventorySize()
  900.     while slot > 0 do
  901.         if inv_map[slot] then
  902.             tmp = get_item_chest_id(side, inv_map[slot].name, inv_map[slot].damage)
  903.             if (tmp and chest_id == tmp) or (not tmp and chest_id == LENTH_MAX and side == "left") then
  904.                 column(inv_map[slot].name, inv_map[slot].damage, inv_map)
  905.             end
  906.         end
  907.         slot = slot - 1
  908.     end
  909. end
  910.  
  911. function column(name, damage, inv_map)
  912.     local slot
  913.     local offset
  914.     local bool = false
  915.  
  916.     offset = 0
  917.     slot = robot.inventorySize()
  918.     while slot > 0 do
  919.         if inv_map[slot] and inv_map[slot].name == name and damage == inv_map[slot].damage then
  920.             bool = false
  921.             robot.select(slot)
  922.             while not robot.dropDown() do
  923.                 move.move(1, side.right)
  924.                 offset = offset + 1
  925.             end
  926.             inv_map[slot] = false
  927.         end
  928.         slot = slot - 1
  929.     end
  930.     move.move(offset, side.left)
  931. end
  932.  
  933. function suck_all()
  934.     local moved
  935.  
  936.     moved = false
  937.     while robot.suckUp() do
  938.         moved = true
  939.     end
  940.     return moved
  941. end
  942.  
  943. --[[
  944. ----    LOG FUNCTIONS
  945. --]]
  946.  
  947. function dump(o)
  948.     if type(o) == 'table' then
  949.         local s = '{ '
  950.         for k,v in pairs(o) do
  951.             if type(k) ~= 'number' then k = '"'..k..'"' end
  952.             s = s .. '[' .. k .. '] = ' .. dump(v) .. '\n'
  953.         end
  954.         return s .. '}\n'
  955.     else
  956.         return tostring(o)
  957.     end
  958. end
  959.  
  960. function get_known_and_unknown(inv_map)
  961.     local slot
  962.     local data
  963.     local tmp
  964.     local k = {}
  965.     local u = {}
  966.  
  967.     slot = robot.inventorySize()
  968.     while slot > 0 do
  969.         data = inv_map[slot]
  970.         if data then
  971.             tmp = tostring(data.name) .. "," .. tostring(data.damage)
  972.             if get_item_chest_id("left", data.name, data.damage) == LENTH_MAX and
  973.                     get_item_chest_id("right", data.name, data.damage) == LENTH_MAX then
  974.                 if not utilitie.is_elem_in_list(u, tmp) then
  975.                     u[#u + 1] = tmp
  976.                 end
  977.                 print("No chest found for ", data.name, " ", data.damage)
  978.             elseif not utilitie.is_elem_in_list(k, tmp) then
  979.                 k[#k + 1] = tmp
  980.             end
  981.         end
  982.         slot = slot - 1
  983.     end
  984.     return u, k
  985. end
  986.  
  987. function purge_includes(main, sub)
  988.     local i
  989.     local x
  990.  
  991.     i = 1
  992.     while i <= #main do
  993.         x = 1
  994.         while x <= #sub do
  995.             if main[i] == sub[x] then
  996.                 main[i] = main[#main]
  997.                 main[#main] = nil
  998.             end
  999.             x = x + 1
  1000.         end
  1001.         i = i + 1
  1002.     end
  1003.     return main
  1004. end
  1005.  
  1006. function check_default_file(filename)
  1007.     local f
  1008.  
  1009.     if not utilitie.file_exists(filename) then
  1010.         f = io.open(filename, "w")
  1011.         f:write("minecraft:air\n")
  1012.         f:close()
  1013.     end
  1014. end
  1015.  
  1016. function get_file_per_lines(filename)
  1017.     local lines = {}
  1018.  
  1019.     for line in io.lines(filename) do
  1020.         lines[#lines + 1] = line
  1021.     end
  1022.     table.sort(lines)
  1023.     return lines
  1024. end
  1025.  
  1026. function update_unknown_list(inv_map)
  1027.     local lines
  1028.     local u
  1029.     local k
  1030.  
  1031.     check_default_file(UNKNOWN_LIST)
  1032.     u, k = get_known_and_unknown(inv_map)
  1033.     io.input(UNKNOWN_LIST)
  1034.     lines = get_file_per_lines()
  1035.     io.input():close()
  1036.     lines = purge_includes(lines, k)
  1037.     lines = purge_includes(lines, u)
  1038.     lines = utilitie.concatenate_arrays(lines, u)
  1039.     table.sort(lines)
  1040.     io.output(UNKNOWN_LIST)
  1041.     for i, l in ipairs(lines) do
  1042.         io.write(l .. "\n")
  1043.     end
  1044.     io.output():close()
  1045. end
  1046.  
  1047. --[[
  1048. ----    ENERGY FUNCTIONS
  1049. --]]
  1050.  
  1051. function base_to_charger()
  1052.     move.move(3, side.front)
  1053. end
  1054.  
  1055. function charger_to_base()
  1056.     move.move(3, side.back)
  1057. end
  1058.  
  1059. function check_energy(on_base)
  1060.     if energy.get_level() < REQ_ENERGY_PER_LOOP then
  1061.         if not on_base then
  1062.             return false
  1063.         end
  1064.         base_to_charger()
  1065.         energy.wait_charging()
  1066.         charger_to_base()
  1067.     end
  1068.     return true
  1069. end
  1070.  
  1071. --[[
  1072. ----    CORE FUNCTIONS
  1073. --]]
  1074.  
  1075. function move_angle(distance)
  1076.     move.move_orientation(side.left)
  1077.     move.move(distance, side.front)
  1078.     move.move_orientation(side.left)
  1079. end
  1080.  
  1081. function check_energy_and_line(border, max_distance, inv_map)
  1082.     if check_energy() then
  1083.         line(border, max_distance, inv_map)
  1084.     else
  1085.         move.move(max_distance, side.front)
  1086.     end
  1087. end
  1088.  
  1089. function core()
  1090.     local inv_map
  1091.     local max_distance
  1092.     local message
  1093.  
  1094.     while true do
  1095.         message = true
  1096.         check_energy(true)
  1097.         while not suck_all() and inventory.is_empty do
  1098.             check_energy(true)
  1099.             if message then
  1100.                 print('Idle')
  1101.             end
  1102.             os.sleep(IDLE_SLEEP_TIME)
  1103.             message = false
  1104.         end
  1105.         print('Active')
  1106.         check_energy(true)
  1107.         inv_map = inventory.get_inventory_map()
  1108.         update_unknown_list(inv_map)
  1109.         max_distance = get_max_distance(inv_map)
  1110.         move.move(4, side.right)
  1111.         check_energy_and_line("right", max_distance, inv_map)
  1112.         move_angle(8)
  1113.         check_energy_and_line("left", max_distance, inv_map)
  1114.         move_angle(4)
  1115.     end
  1116. end
  1117.  
  1118. function update()
  1119.     print('Updating...')
  1120.     if net.get_page_to_file(PASTE_URL, FILEPATH) then
  1121.         print('Updated successfully.')
  1122.         return true
  1123.     end
  1124.     print('Failed to update.')
  1125.     return false
  1126. end
  1127.  
  1128. if arg[1] and (arg[1] == '-u' or arg[1] == '--update') then
  1129.     return update()
  1130. end
  1131.  
  1132. core()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement