-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundled Cable compatibility with ComputerCraft is broken #1785
Comments
Thanks for looking into this. Definitely seems like remnants from when we moved from Scala to Java. According to the old Scala code, This is also why the So overall, I think we fix it like this:
|
Found it! Here, the Bundled Cable asks its neighbor for a bundled signal. This line specifically is for registered interactions. For whatever reason, it's using the rotation index rather than converting it into a direction index. ProjectRed/transmission/src/main/java/mrtjp/projectred/transmission/part/BundledCablePart.java Line 234 in 292850d
Instead it should be doing what line 230 does, converting that rotation to direction. Same deal with Bundled gate parts: ProjectRed/integration/src/main/java/mrtjp/projectred/integration/part/BundledGatePart.java Line 89 in 292850d
|
Describe the bug
There appears to be a couple of minor bugs with ProjectRed's bundled cable API which mean that its CC compatibility is non-functional.
To Reproduce
Steps to reproduce the behaviour:
rs set right white true
.rs probe
on the computer.Expected behaviour
I would expect the lamp to turn on, and
rs probe
to indicate that the white channel is active.Versions
Include versions of the dependencies. And since you're looking at it, make sure ProjectRed is up to date. Don't submit bugs for old versions, as they could have been fixed.
Additional notes
I've managed to find the cause of a couple of these problems, but afraid not everything:
The transmission API always returns
null
, rather than the newly generatedsignals
array:ProjectRed/transmission/src/main/java/mrtjp/projectred/transmission/TransmissionAPI.java
Line 67 in 292850d
I noticed that
BundledSignalsLib
also contains a copy of this method with the correctreturn signals;
. I suspect this is just a relic of the Java port (which serious kudos, that must have been an incredible amount of work)ProjectRed/core/src/main/java/mrtjp/projectred/core/BundledSignalsLib.java
Lines 62 to 65 in 292850d
The CC bundled redstone provider offsets the position and flips the direction:
ProjectRed/core/src/main/java/mrtjp/projectred/compatibility/ComputerCraftCompatibility.java
Line 32 in 292850d
This shouldn't be needed - doing
ProjectRedAPI.transmissionAPI.getBundledInput(world, pos, side);
and fixing the above bullet fixes issues with flipping the lever not being detected by the computer.The side passed to
IBundledTileInteraction.getBundledSignal
doesn't appear to be correct. I'm afraid I got a little lost here with how PorjectRed handles rotations, so haven't been able to debug this further.The text was updated successfully, but these errors were encountered: