NucleusPowered / Nucleus

The Ultimate Essentials Plugin for Sponge.
http://nucleuspowered.org
MIT License
158 stars 70 forks source link

0 Tick Redstone Pulse Not Working Due to Nucleus #1622

Closed SansMe69 closed 3 years ago

SansMe69 commented 3 years ago

What is the bug? The attached image shows a redstone circuit that functions just fine without Nucleus being installed, however with the plugin added it stops working. It was suggested that I try using the -Dsponge.shouldFireAll launch option, but that didn't seem to make any difference.

redstone

What version of Nucleus are you running? 2.4.0

What version of Sponge are you running? 1.12.2-2838-7.3.1-RC4082 - also tested on 1.12.2-2838-7.2.4-RC4074 with the same result.

Provide a link to the file generated by /nucleus info nucleus-info-20211010-213003.txt

To Reproduce Steps to reproduce the behavior: Construct the circuit shown above, two observers facing upwards, a block on top of both, a sticky piston next to the top-most observer, and a redstone block on the face of the sticky piston. Trigger the bottom observer by placing any block where the dust is shown in the image - nothing will happen.

Expected behavior Trying the same circuit in a vanilla world, or a server without Nucleus installed will show that triggering the bottom observer will cause the piston to extend and immediately retract. This is the intended and normal result

Logs https://gist.github.com/SansMe69/cdfab065ab3ca71c2456218a2357846c - latest.log

dualspiral commented 3 years ago

It's not Nucleus, it does not touch redstone at all - and I'm going to close this issue because I know this issue is actually Sponge.

What you should have been told is to try using -Dsponge.shouldFireAll=true with no plugins installed, and that should reproduce this issue. That's because Nucleus listens to some high frequency events, and so Sponge doesn't run the code required to fire the events unless something listens to it, but that flag (with =true at the end) tells Sponge to always fire the events and the code surrounding them irrespective of whether something is listening to them. Pistons are particularly wonky in corner cases with Sponge - and I think that's what you're seeing.

You could probably disable the protection module in Nucleus and this might resolve it because it'll stop listening to the event I think is causing this, but it's not Nucleus itself.

TL;DR: Nucleus listens to some events, causing Sponge to run event logic which is where the bug is.