This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
csocsi96's profile picture

Tekkit Classic - Computer Controlled Nuclear Reactor

Started by csocsi96, 27 March 2015 - 06:00 PM
csocsi96 #1
Posted 27 March 2015 - 07:00 PM
Hi there,

A long time ago, I found a video on youtube explaining how to make a fully automated computer controlled Nuclear Reactor in Tekkit Classic.

Unfortunately I lost the code and the video URL as well due to new Windows installation…

I am trying to ask you guys to help with the coding. (I learn Java at school, so I'm not a newbie in coding.)

As far as I remember the code was split into 3 parts.

First one - Working state, where every uranium is loaded and only ice needs to be replenished in order to keep the reactor cooled.
Second one - As soon as the Uranium cells become depleted, shut it down immediately and get rid of the items inside the reactor using item detectors, filters etc….
Third one - There were like coordinates in the code for example put 9 uranium cells into the first 5 rows, 1 at the beginning of the 6th row, then 7x64 ice cubes and one uranium cell again. As soon as it's done repeat the process from First stage.

The reloading stage looked like on the right side of the computer were red alloy wires becoming active every second, so I guess the code repeated itself 54 times since it's the number of slots in the reactor.
The substantive part of the code would be the part that I mentioned in the Third stage to get the items loaded in order and then restart the process.


Actually I have the automatic crafting tables, filters and stuff like that done, the reactor shuts down if the temperate is over 5000 so only the refilling thingy is missing. If you could help me with the code I would be more than grateful!


Thanks in advance.

Best Wishes,
Henrik Varga
Lyqyd #2
Posted 27 March 2015 - 11:10 PM
Moved to Ask a Pro.
Bomb Bloke #3
Posted 28 March 2015 - 12:21 AM
You may need to be more specific. I for one have no idea which reactor you're talking about - you haven't even specified the mod involved, let alone the version, and many coders here (eg me) won't've played with that particular reactor even if you had.

Assuming you don't have any code written yet, start out by plotting down the pseudo-code. Boil it down to what you actually need your script to do. As it stands, I'm inclined to think you could fill your reactor using a pipe or a hopper or somesuch.
Lyqyd #4
Posted 28 March 2015 - 04:56 AM
The reactor being discussed is the IC2 reactor, from the version of IC2 for Minecraft 1.2.5.
csocsi96 #5
Posted 28 March 2015 - 10:24 AM
Yes it is the IC2 reactor from 1.2.5.

Now I am using filters to get rid of depleted uranium cells which is powered by a timer through a red alloy wire. I need this powered only when It really needs to get rid of depleted uranium.

This is how I imagine the code:

START

Checks if the reactor is loaded with uranium cells and ice

If yes:
Start the reactor

If no:
Trash every item inside and load a completely new set of
uranium and ice

WHILE (reactor is producing energy, working)
if (reactor's temp > 5000)
shut down
check if there's enough ice in the reactor
if yes:
wait until temperature is under 500
restart reactor
if no:
trash everything inside and reload with uranium cells and ice
then restart reactor
ENDWHILE

END

I clearly remember that the reloading process looked like this:
The computer trashed everything inside the reactor and began loading.
Loaded the first 6 rows with uranium and plus one
Then loaded 7 x 64 ice
Then one uranium cell for the last place and began producing energy.

The items are going through pneumatic tubes using filters, transposers to suck them out of chests.

I am using the following layout for the reactor (where u stands for uranium and i for ice):