Advertisement
SenpaiJody

Ars Noveau Essence Crafting

Nov 5th, 2022 (edited)
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.57 KB | None | 0 0
  1. local barrelName = "minecraft:barrel_0"
  2. local barrel = peripheral.wrap(barrelName)
  3. local pedestalNames = {"ars_nouveau:arcane_pedestal_0","ars_nouveau:arcane_pedestal_1","ars_nouveau:arcane_pedestal_2"}
  4. local pedestals = {peripheral.wrap(pedestalNames[1]),peripheral.wrap(pedestalNames[2]),peripheral.wrap(pedestalNames[3])}
  5.  
  6. local recipes = {}
  7.  
  8. recipes["Abjuration"] = {"minecraft:fermented_spider_eye","minecraft:milk_bucket", "minecraft:sugar"}
  9. recipes["Conjuration"] = {"ars_nouveau:wilden_horn", "ars_nouveau:starbuncle_shards","minecraft:book"}
  10. recipes["Air"] = {"minecraft:feather","ars_nouveau:wilden_wing", "minecraft:arrow"}
  11. recipes["Earth"] = {"minecraft:iron_ingot", "minecraft:wheat_seeds","minecraft:dirt"}
  12. recipes["Fire"] = {"minecraft:flint_and_steel","minecraft:torch","minecraft:gunpowder"}
  13. recipes["Manipulation"] = {"minecraft:clock", "minecraft:redstone", "minecraft:stone_button"}
  14. recipes["Water"] = {"minecraft:water_bucket", "minecraft:kelp", "minecraft:snow_block"}
  15.  
  16. function returnAll()
  17.     for i = 1, 3, 1 do
  18.         pedestals[i].pushItems(barrelName, 1)
  19.         end
  20.     end
  21.  
  22. function sendToPedestal(r)
  23.     recipe = recipes[r]
  24.     for i = 1, 3, 1 do
  25.         --print("Finding "..recipe[i])
  26.         for j = 1, 21, 1 do
  27.             if barrel.getItemDetail(j) ~= nil and barrel.getItemDetail(j).name == recipe[i] then
  28.                 barrel.pushItems(pedestalNames[i], j)
  29.                 break
  30.                 end
  31.             end
  32.         end
  33.     end
  34.  
  35. --if arg[1] == "return" then returnAll()
  36.     --else
  37.     --sendToPedestal(recipes[arg[1]])
  38.     --end
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement