Ender IO Forestry

Ender IO Forestry

954k Downloads

Add api for bundled/colored redstone conduits

payonel opened this issue ยท 9 comments

commented

Issue Description:

In short, this is a request for an interface/api to utilize EnderIO redstone conduit color-based channels

We look forward to improving OpenComputers integration with EnderIO, specifically with EnderIO's redstone channels. Currently in 1.12 we support getting and setting redstone signal strength on the redstone conduit, treating it as a vanilla redstone resource. I believe that currently there is not way for us to add this integration.

Affected Versions

EnderIO-1.12.2-5.0.44.jar

commented

Heya, what's the sitrep on this one? Would love to have this!

commented

So currently we have the following code (commented out since cc integration was remove a while ago), but if I understand correctly it should provide the sort of information you need?

https://github.com/SleepyTrousers/EnderIO/blob/310a5e216bf799d8e8a1822ba80d0e3c33230d6d/enderio-conduits/src/main/java/crazypants/enderio/conduits/conduit/redstone/InsulatedRedstoneConduit.java#L460

https://github.com/SleepyTrousers/EnderIO/tree/master/enderio-conduits/src/main/java/crazypants/enderio/conduits/integration/computercraft

If so, I can look into externalising an api like this.

commented

that looks like part of it - specifically the getter Map<DyeColor, Signal>. Also, I'm happy to implement and interface, and/or a capability; I am happy to put most of the integration (i.e. cross mod code) on the OC side (yep, enderio gets special treatment ๐Ÿ‘ )

I suspect there will be 16 dye/color redstone values? I'll refer to these as the bundled redstone power levels

Here are some example concepts I want to implement

  1. redstone conduits should know that some OC blocks can receive/read bundled redstone levels.
  2. some OC blocks should be able to set (emit) the bundled set of redstone values to redstone conduits
commented

I'll have a look to put parts of the old code back in place so any API adapter code can hook into the conduits. It won't be a full fledged API (or API usage), but just enough for an API adapter!

commented

This would be awesome. The last time I wanted to use bundled redstone, I had to use OC to talk to TIS3D to talk to charset bundled wires because all of the other OC compat I wanted to use was disabled or not yet reimplemented.

commented

I had a quick look at the 1.7.10 code to see what we did in the past. I found a more generic way to read other block's bundled signals, but I didn't find how other blocks could read the conduits' bundled signals. I'm probably blind---anyone here with at least one eye? ;)

commented

but I didn't find how other blocks could read the conduits' bundled signals

wasn't there an API provided by either computercraft or project red!? Those are at least the most known mod to me that brought in colorchannels that were interacting properly

commented

Instead of trying to overhaul conduits entirely to re-implement this, would it be reasonable to add a new filter for "bundled redstone" that can be used on the input or output of a given redstone connector to remove the color selection, remove strong/weak option, and just provide the bundled signal in/out?

commented

well.. 8eb67c6 says it "cleans up" redstone conduits but it makes the ISignalProvider API entirely unused despite still being defined. ISignalProvider definitely seems like the wrong shape because it doesn't use/understand BundledSignal. how much could the above commit be just straight up reverted to restore this behavior?