ComputerCraft connecting to Buildcraft pipewire

DaemosDaen

New Member
Jul 29, 2019
232
0
0
I've scoured the interwebs I cannot find a reasonable way to connect ComputerCraft computers and BuildCraft pipe wire WITHOUT using RedPower.

I'm not well versed with Lua nor do I know 90% of CC's commands so I may be wrong.

The reason I want to do this is to control my breeder IC2 Nuke reactor, the computer or turtle should be able to access the Nuke's inventory, check for fuel and isotopes and turn on the correct pipe wire to active gates/ME export busses. Life would be easier if there were a fuzzy version of BC's items in inventory gate setting.
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
You can use gates on each side of the computer to convert each direction's redstone signal into a separate color pipe wire signal, although this can get very space-consuming if you need more than six wires.
 

DaemosDaen

New Member
Jul 29, 2019
232
0
0
I can live with that, but I get the feeling that automating my breeder reactor is gonna be harder than I thought. alot harder...
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
It's very possible with ComputerCraft. A turtle's probably the easiest solution, actually, and you don't really need to bother with redstone signals to the ME network at all if you do it that way*. What particular setup and difficulty are you looking at?

* For systems with one breeder and no reactors using the same fuel types..
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
You can sort through inventories using the CompareTo command, but this involves pulling items out the target chest/reactor to start with (although OpenCCSensor's InventorySensorCard can bypass that). That's a really bad idea with a hot reactor, even with ignoring the possibility of server-specific bugs.

ComputerCraft's really not built for that sort of thing, and there are other mods that do that particular part better. A single emerald pipe, for example, can be set to pull out only Enriched Cells (and near-depleted cells, if you use uranium fuel), and even signal when it has done so, while AE can even treat the reactor as if it were a chest on the network (though it has counting problems when doing so in rv10, these are predictable). Specialized tools like the GregTech Electric Automation stuff are even more capable.

The more serious thing is that don't need to do that. With LUA, you can know and remember the status of the reactor, and it is embarrassingly predictable.
 

DaemosDaen

New Member
Jul 29, 2019
232
0
0
well, I know I can pull things out emerald pipes and gates, but I'ed want to trigger one AE export bus to fill the isotopes, and another AE export bus for fuel refill (dual thorium) and if both are gone at once, I'ed want to re-insert the thorium then isotopes...

but we just had a significant server crash tho so I won't be able to continue the build... /sad panda
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
If you're dead set on reading inventory status, then OpenCCSensors is the way to go. Complex, and there are a lot of places you can make mistakes, though.

Simpler method is timing-based. Uranium lasts 10,000 seconds, Thorium needs to be replaced after 25000 seconds (50000 seconds in GregTech 2.8), and you can pulse the near-depleted import/export buses based on the the period it takes to charge the cells, pausing the pulse for one minute before and after the Thorium need be replaced. Automatic restarts needs a little bit of extra robustness checking, and you probably want an AE Level Emitter to prevent problems related to depleted cells running out.

((You could even do this with vanilla redstone circuits, if you were really crazy. A saner not-ComputerCraft solution would probably involve gates using the Item in Tube and the Inventory Full check.))