MineMcMine

ExternalCrafter Recipe Maker

Apr 24th, 2022 (edited)
989
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Using: CC: Tweaked, Plethora
  3.     pastebin run FeiUhiS5
  4. ]]--
  5.  
  6. if pcall(os.loadAPI, "jLib/jFuncs") then
  7. else
  8.     shell.run("pastebin get kqBFGcfV jLib/jFuncs")
  9.     os.loadAPI("jLib/jFuncs")
  10. end
  11.  
  12. self = peripheral.wrap("left")
  13.  
  14. local function toExportFormat(itemData)
  15.     if(itemData == nil) then
  16.         return nil
  17.     end
  18.  
  19.     ret = {}
  20.     ret["name"] = itemData.name
  21.     ret["damage"] = itemData.damage
  22.     ret["nbtHash"] = itemData.nbtHash
  23.  
  24.     return ret
  25. end
  26.  
  27. local inv = self.getInventory().list()
  28. local ret = {}
  29. ret["test"] = {}
  30. ret["test"][1] = toExportFormat(inv[1])
  31. ret["test"][2] = toExportFormat(inv[2])
  32. ret["test"][3] = toExportFormat(inv[3])
  33.  
  34. ret["test"][4] = toExportFormat(inv[5])
  35. ret["test"][5] = toExportFormat(inv[6])
  36. ret["test"][6] = toExportFormat(inv[7])
  37.  
  38. ret["test"][7] = toExportFormat(inv[9])
  39. ret["test"][8] = toExportFormat(inv[10])
  40. ret["test"][9] = toExportFormat(inv[11])
  41.  
  42.  
  43.  
  44. file = fs.open("tempUpload", "w")
  45. file.write(textutils.serialize(ret))
  46. file.close()
  47. shell.run("pastebin put tempUpload")
Advertisement
Add Comment
Please, Sign In to add comment