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

Can a computer monitor a Magma Crucible?

Started by SyberSmoke, 24 April 2013 - 08:12 AM
SyberSmoke #1
Posted 24 April 2013 - 10:12 AM
The setup:
One Magma Crucible
Six Combustion Engines
Allot of Pipe

The Goal:
To set up a monitoring system where the computer will emit a red stone signal while the crucible has fuel. When the Crucible runs out of fuel, the signal will end and the engines will turn off.

Can this be done? And can it be done using the current version of CC that is in the Feed the Beast Mindcrack pack for Minecraft 1.4.7?
Lost Ninja #2
Posted 24 April 2013 - 01:34 PM
Not sure if Mindcrack has MiscPeripherals but if it does you could try using the gate reader block next to the Magma Crucible…

But it should work with the same style of code that DW20 used to monitor his batteries… which I don't have… I do have this which is a modified version, but I think you can see from it how to to read the energy state of the Magma Crucible's 'fuel'. The text strings can be found by placing a BC gate next to the machine and looking at it's various states.


mon = peripheral.wrap("right")
rout = "bottom"

function output(msg)
	term.clear()
	term.setCursorPos(1,1)
	print(textutils.formatTime(os.time(), boolean))
	print(msg)
end

while true do
	data = mon.get()
	if (data["Full Energy"]) == true then
		redstone.setOutput(rout, true)
		output("Battery Full")
		data = mon.get()
	else
		redstone.setOutput(rout, false)
		output("Battery Charging: Engines On")
		data = mon.get()
	end
	sleep(60)
end

Edit: To Add without Misc Periphs I don't think you can read any block directly with CC, but you could achieve the same ends using BC gates.