
Redstone interface receiving functionality always returns zero.
IpsumCapra opened this issue · 8 comments
The issue
Using the getRedstoneInput(Side side)
of a redstone
device always returns zero.
How to reproduce
- Get a preconfigured computer, attach a Redstone Interface (Card).
- Give the computer power, (i.e. attach an infinite energy source).
- Create a redstone signal on top of PC. In the example images it's a fully powered redstone cross.
- Login with the
root
account. - Open the Lua console. (
lua
command) - Enter:
require("devices"):find("redstone"):getRedstoneInput("up")
. - It returns
0.0
. Expected output is15.0
.
Expected behavior
When running the getRedstoneInput(Side side)
function, the correct signal strength on the given side should be returned.
Does this also happen with a redstone block sitting on top? Might be a quirk of redstone. Do redstone lamps light up when in the place of the computer in this setup?
I wonder what causes it, I checked the code, The detecting function is there. It seems to always return 0 because of some cases, perhaps something is triggering those...
AFAICT this seems to happen with redstone interface blocks, too, not just the cards.
Ah OK, I wasn’t sure whether that was meant to be the “also” use of parentheses (i.e. happens with both) or the “clarifying” use of parentheses (i.e. happens only with the card).
I actually forked oc2 to try and fix this problem, would you mind if i took it on @fnuecke?
I have also tested it with redstone blocks, thought it might be the problem, that's why i switched to a redstone cross.