Project Red - Expansion

Project Red - Expansion

31M Downloads

[Bug] Repeaters inside fabricated circuits don't have off delays

BlackStar8107 opened this issue ยท 1 comments

commented

Minecraft version

1.19.x

CodeChickenLib version

4.3.2.490

CBMultipart version

3.2.0.139

ProjectRed version

4.17.0-beta+34

What happened?

If you build a fabricated gate ( from PR: Fabrication ) which uses repeaters, the repeater component has a tick delay for turning on, however the repeater will instantly turn off when power is removed. The repeater should have a tick delay before it turns off as well.

So far this issue goes back to at least beta+29. ( This might be updated if I test older versions )

Crash log

N/A

How do you make it happen again?

This
This circuit is just a repeater with a max delay. If you hook that gate up to
this
This circuit then you will notice the ~13 second delay when applying power, however when you turn the power off the circuit instantly de-powers.

commented

Hi I was looking around in the code for what could be causing this and I am quite confident I found it.

On line 138 in : fabrication\src\main\java\mrtjp\projectred\fabrication\engine\gates\RepeaterGateTile.java

You are comparing readSchedTime to readSchedTime, where I think you mean to compare SysTime to SchedTime.

I've changed a local copy and recompiled it and this fixed the issue!
I'm going to pop a pull request for this fix in shortly!