Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Thaumcraft automatic infuser.
- -- This is a computercraft code to automate thaumcraft infusion crafting in Minecraft
- --Wrap the item input
- p=peripheral.wrap("left")
- --wrap the 24 pedestals that will represent all possible item placement arrangement
- --The order goes: LeftMiddle 1, CentreMiddle 1, RightMiddle 1, left Diagonal 1/2, Centre Diagonal 1/2, Right Diagonal 1/2,
- --LeftMiddle 2, ...
- LM1 = peripheral.wrap("container_pedestal_1")
- CM1 = peripheral.wrap("container_pedestal_2")
- RM1 = peripheral.wrap("container_pedestal_3")
- LD12 = peripheral.wrap("container_pedestal_4")
- CD12 = peripheral.wrap("container_pedestal_5")
- RD12 = peripheral.wrap("container_pedestal_6")
- LM2 = peripheral.wrap("container_pedestal_7")
- CM2 = peripheral.wrap("container_pedestal_8")
- RM2 = peripheral.wrap("container_pedestal_9")
- LD23 = peripheral.wrap("container_pedestal_10")
- CD23 = peripheral.wrap("container_pedestal_11")
- RD23 = peripheral.wrap("container_pedestal_12")
- LM3 = peripheral.wrap("container_pedestal_13")
- CM3 = peripheral.wrap("container_pedestal_14")
- RM3 = peripheral.wrap("container_pedestal_15")
- LD34 = peripheral.wrap("container_pedestal_16")
- CD34 = peripheral.wrap("container_pedestal_17")
- RD34 = peripheral.wrap("container_pedestal_18")
- LM4 = peripheral.wrap("container_pedestal_19")
- CM4 = peripheral.wrap("container_pedestal_20")
- RM4 = peripheral.wrap("container_pedestal_21")
- LD41 = peripheral.wrap("container_pedestal_22")
- CD41 = peripheral.wrap("container_pedestal_23")
- RD41 = peripheral.wrap("container_pedestal_0")
- --loop checks every 15 secs if items are in input(with redstone signal from comparator)
- x=true
- while x == true do
- if rs.getInput("front")==true then
- --loop then checks what item is in slot 1 of the chest, and that item will tell the computer what's crafting
- slot = p.getStackInSlot(1)
- if slot.display_name=="Boots of the Traveller" and slot.id == "minecraft:iron_sword" then
- print("Boots of the Traveller")
- p.pushItemIntoSlot("west",3,1,3)
- p.pushItemIntoSlot("west",3,1,23)
- p.pushItemIntoSlot("west",4,1,7)
- p.pushItemIntoSlot("west",4,1,11)
- p.pushItemIntoSlot("west",5,1,19)
- p.pushItemIntoSlot("west",6,1,15)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- -- iron sword called : Boots of the Traveller * 1
- -- leather boots * 1
- -- enchanted fabric * 2
- -- air shard * 2
- -- feather * 1
- -- raw fish * 1
- elseif slot.display_name=="Sword of the Zephyr" and slot.id == "minecraft:iron_sword" then
- print("Sword of the Zephyr")
- p.pushItemIntoSlot("west",3,1,5)
- p.pushItemIntoSlot("west",3,1,11)
- p.pushItemIntoSlot("west",4,1,17)
- p.pushItemIntoSlot("west",5,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- -- iron sword called : Sword of the Zephyr * 1
- -- thaumium sword * 1
- -- air shard * 2
- -- greatwood log * 1
- -- diamond * 1
- elseif slot.display_name=="Axe of the Stream" and slot.id == "minecraft:iron_sword" then
- print("Sword of the Zephyr")
- p.pushItemIntoSlot("west",3,1,5)
- p.pushItemIntoSlot("west",3,1,11)
- p.pushItemIntoSlot("west",4,1,17)
- p.pushItemIntoSlot("west",5,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- -- iron sword called : Axe of the Stream * 1
- -- thaumium axe * 1
- -- water shard * 2
- -- greatwood log * 1
- -- diamond * 1
- elseif slot.display_name=="Pickaxe of the Core" and slot.id == "minecraft:iron_sword" then
- print("Sword of the Zephyr")
- p.pushItemIntoSlot("west",3,1,5)
- p.pushItemIntoSlot("west",3,1,11)
- p.pushItemIntoSlot("west",4,1,17)
- p.pushItemIntoSlot("west",5,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- -- iron sword called : Pickaxe of the Core * 1
- -- thaumium pickaxe * 1
- -- fire shard * 2
- -- greatwood log * 1
- -- diamond * 1
- elseif slot.display_name=="Hoe of Growth" and slot.id == "minecraft:iron_sword" then
- print("Sword of the Zephyr")
- p.pushItemIntoSlot("west",3,1,5)
- p.pushItemIntoSlot("west",4,1,11)
- p.pushItemIntoSlot("west",5,1,17)
- p.pushItemIntoSlot("west",6,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- elseif slot.display_name=="Shovel of the Earthmover" and slot.id == "minecraft:iron_sword" then
- print("Sword of the Zephyr")
- p.pushItemIntoSlot("west",3,1,5)
- p.pushItemIntoSlot("west",3,1,11)
- p.pushItemIntoSlot("west",4,1,17)
- p.pushItemIntoSlot("west",5,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- elseif slot.display_name=="Ichor" and slot.id == "minecraft:iron_sword" then
- print("Ichor")
- p.pushItemIntoSlot("west",3,1,5)
- p.pushItemIntoSlot("west",4,1,11)
- p.pushItemIntoSlot("west",5,1,17)
- p.pushItemIntoSlot("west",6,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- elseif slot.display_name=="Lamp of Growth" and slot.id == "minecraft:iron_sword" then
- print("Lamp of Growth")
- p.pushItemIntoSlot("west",3,1,3)
- p.pushItemIntoSlot("west",4,1,7)
- p.pushItemIntoSlot("west",5,1,11)
- p.pushItemIntoSlot("west",3,1,15)
- p.pushItemIntoSlot("west",4,1,19)
- p.pushItemIntoSlot("west",5,1,23)
- p.pushItemIntoSlot("south",1,1,1)
- p.pushItemIntoSlot("down",2,1,1)
- else
- print("ERROR. Unknown recipe.")
- end
- end
- LM1.pullItemIntoSlot("south",1)
- CM1.pullItemIntoSlot("south",2)
- RM1.pullItemIntoSlot("south",3)
- LD12.pullItemIntoSlot("south",4)
- CD12.pullItemIntoSlot("south",5)
- RD12.pullItemIntoSlot("east",6)
- LM2.pullItemIntoSlot("east",7)
- CM2.pullItemIntoSlot("east",8)
- RM2.pullItemIntoSlot("east",9)
- LD23.pullItemIntoSlot("east",10)
- CD23.pullItemIntoSlot("east",11)
- RD23.pullItemIntoSlot("north",12)
- LM3.pullItemIntoSlot("north",13)
- CM3.pullItemIntoSlot("north",14)
- RM3.pullItemIntoSlot("north",15)
- LD34.pullItemIntoSlot("north",16)
- CD34.pullItemIntoSlot("north",17)
- RD34.pullItemIntoSlot("west",18)
- LM4.pullItemIntoSlot("west",19)
- CM4.pullItemIntoSlot("west",20)
- RM4.pullItemIntoSlot("west",21)
- LD41.pullItemIntoSlot("west",22)
- CD41.pullItemIntoSlot("west",23)
- RD41.pullItemIntoSlot("south",24)
- sleep(15)
- end
- --Implementation of code:
- --1. place advanced computer facing west.
- --2. place another enderchest with different frequency (f2) in front of the first enderchest ( on the west side.)
- --3. place a third enderchest with a third frequency beneath the first enderchest
- --4.1 if you are automating with applied energistics, then place an ME interface on the left(south) side of the first enderchest.
- --4.1 Any recipes for the infusion items should go in this interface
- --4.2 If you are not automating with AE, then all you have to do is place another chest here. This chest will is the one the
- --4.2 computer will eject the iron swords into.
- --5. Now construct your infusion alter if it isn't already (24 pedestals) and add amgical paraphinaelia to stabilise the rituals.
- --6. Now connect networking cables too the computer and then run them to the pedestals.
- --7. Connect them to the pedestals with peripheral proxys, starting with the first one being the LeftMiddle on the south side, and then going clockwise.
- --8. Now place transvector interfaces next to each interface. They should be on the face of the pedestal opposite to the alter.
- --9. Next, link up the transvectors with enderchests that have the same frequency as the 1st enderchest.
- --9. (Multiple transvectors can be connected to the same enderchest)
- --10. Next, place an enderchest with the 2nd frequency close to the centre pedestal and connect some method of item
- --10. transportation from it to the pedestal
- --NOTES:
- -- * When adding items to the input chest, add the items in the order mentioned in the code.
- -- * Add this code to run in the startup of the computer with edit startup and shell.run(program_name).
- -- *** If you want the infusion to automatically start, get the rewuired researches for yourself, bind a tome of knowledge sharing to yourself, put that in an autonymous activator, to give it the research, and then give it a wand so it faces the runic matrix and right clicks on it with the wand to start it.
Advertisement
Add Comment
Please, Sign In to add comment