Last active
August 18, 2025 18:39
-
-
Save isochronous/161401ec617f8e9fa4212359b4b5450f to your computer and use it in GitHub Desktop.
A ComputerCraft program for automating a Thaumcraft Infusion Altar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local inputName = "abyssalcraft:tileentitycrate_0" | |
| local centralPedestalName = "thaumcraft:tilepedestal_0" | |
| local pedestalNameBase = "thaumcraft:tilepedestal_" | |
| local outputName = "appliedenergistics2:interface_4" | |
| -- Set this to the number of pedestals you have, NOT counting the central pedestal | |
| local pedestalCount = 16 | |
| -- set to whatever your first (should be central!) pedestal ID is when you start enabling modems | |
| -- For example, if the first pedestal modem you turn on says its name is "thaumcraft:tilepedestal_15", set this to 15 | |
| -- This script assumes all pedestals in one infusion setup will have consecutive IDs with no gaps | |
| local startPedestalID = 0 | |
| local input = peripheral.wrap(inputName) | |
| local output = peripheral.wrap(outputName) | |
| local centralPedestal = peripheral.wrap(centralPedestalName) | |
| while true do | |
| local inputList = input.list() | |
| if #inputList > 0 then | |
| -- save the first item's metadata so we can monitor when it changes | |
| local centralItem = input.getItemMeta(1) | |
| -- push first item to center | |
| input.pushItems(centralPedestalName, 1, 1) | |
| -- push the rest of the items to the pedestals | |
| local outputNum = startPedestalID | |
| for slot, item in pairs(inputList) do | |
| local count = item.count; | |
| for i = 1, count do | |
| input.pushItems(pedestalNameBase .. outputNum, slot, 1) | |
| outputNum = outputNum + 1 | |
| if outputNum > pedestalCount then | |
| break | |
| end | |
| end | |
| end | |
| while centralPedestal.getItemMeta(1).rawName == centralItem.rawName do | |
| os.sleep(0.2) | |
| end | |
| -- take result and any leftover ingredients off the pedestals | |
| for ped = startPedestalID, pedestalCount do | |
| output.pullItems(pedestalNameBase .. ped, 1, 1) | |
| end | |
| end | |
| os.sleep(0.2) | |
| end |
Author
Author
And finally, this script requires that the central item be the first item listed in the AE2 pattern.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just make sure any interfaces, unpackagers, etc you use next to the crate are set to blocking mode