Redstone Pen

Redstone Pen

6M Downloads

[Issue] Timers get stuck when tickrate == 1

Saftur opened this issue ยท 3 comments

commented

For example, with this code:

tickrate = 1
r = ton1(1, 100)

TON1.ET will rapidly alternate between 0 and 1 indefinitely, and the timer will never complete. And as far as I've seen, it does the same with tof and tp. Is there some reason timers would be incompatible with tickrates of 1, or custom tickrates in general? They seem to work fine with tickrates greater than 1.

Minecraft version: 1.18.2
Forge version: 40.1.86
Redstone Pen version: 1.0.11

commented

Hi, aye I could reproduce it in my 1.19 ide. It's a "+1" race condition that comes from compensating from game tick (20Hz) to Redstone tick (10Hz). I'll quickly kick that and add timer deadlines, so that timers are accurate no matter what tickrate is specified. Let's see if this is quickly fixable or if it has a catch ;)

commented

Oky, can you retry with redstonepen-1.18.2-1.0.12.jar? IDE tests on my machine were ok. Cheers,-

commented

It appears to work just fine now. Thanks!