McJtyMods / XNet

Advanced item/liquid/energy/... networking
MIT License
94 stars 53 forks source link

Combining 2 sensor output colors seems to be broken on routed logic channels; output colors "blink"/alternate #469

Open canvon opened 3 years ago

canvon commented 3 years ago

Issue description: When routing logic channels, the output colors "blink" on and off, alternating between a good value from local net and from remote net, but never both at the same time. Thus, an item channel with extract/insert limited to both colors at the same time will not transfer anything.

Steps to reproduce: Create a world in Creative Mode. Set up 2 basic networks with Controller + Battery, and a Chest each, then connect via the same router. Create an Item channel on both (named "Sink" and "Source"), connect in the router GUI (name both "Items"). Create logic channels the same way (named "SinkSense" and "SourceSense"), connect in the router (name both "Log").

Then, on the first network, channel SinkSense, create a Sensor on the output Chest, to match Item < 32 output color white. On the second network, channel SourceSense, create a Sensor on the input Chest, to match Item >= 48 output color red

After that, set up Sink with Insert on colors white + red, and set up Source with an unconditional random Extract. It should not be transferring any items.

For visualization of what seems to be the problem (namely alternating blinking of output colors, instead of them staying on both at the same time, allowing the AND between white and red in the Insert to match), add 2 Redstone Proxies to the first network, add them to the SinkSense channel as Outputs with redstone level 15, one limited to color white, the other to color red. Place 1 redstone dust before each Proxy. It should be blinking alternatingly along, now, never both colors on at the same time.

On included screenshots, there's also a router network with a third network which just exports an empty logic channel to make the (slightly misleading?) "Too many channels on router" error message go away. (This would be a separate issue later.)

Versions:

Possibly incompatible mods and versions: ?

Screenshots: 2021-02-16_20 24 21 2021-02-16_20 24 46 2021-02-16_20 24 48 2021-02-16_20 24 50 2021-02-16_20 25 04 2021-02-16_20 25 14

canvon commented 3 years ago

It is reproducible with much less mods, too. (Minecraft 1.16.4, Forge 35.1.36, McJty lib 5.0.15, RFTools Base 2.0.9, RFTools Power 3.0.8, XNet 3.0.11, JEI 7.6.1.65; the latter as I was unable to find anything XNet except for the Controller via vanilla Creative Mode search...)

Also output color white will blink (in the block-updating Redstone Proxy + Redstone Dust visualization) from the moment the 2 logic channels are routed together, even when there's nothing entered, yet, on the 2nd side... (This time reproduced with 2 connected Routers, so seems to happen whether routing locally on the same router or remotely.)

2021-02-17_16 29 01

jjjuk commented 2 years ago

Same problem, waiting for response!

osirisgothra commented 2 years ago

I struggled with this problem as well, and for simpler in/out uses of redstone, too. Turns out it pulses back and forth even when it seems like it shouldn't. Blinking on and off, locally, wirelessly, and on router networks the same. Turns out, putting the SENSORs on a separate numbered channel (the ones at the top numbered 1 thru 8) from the OUTPUTs solved this issue. I am not entirely sure that this will fix it for everyone--but it should at least point you in the right direction, and maybe give the dev team something more to go on.... Oh and also, it may also help to keep anything INPUTTING a signal on a separate channel than ones OUTPUTTING, just an afterthought!