Advanced Peripherals

Advanced Peripherals

29M Downloads

Redstone integrator takes a tick/0.05 secs for any operation

Saftur opened this issue ยท 3 comments

commented

Describe

All or at least some of the functions on the redstone integrator for setting redstone values take a tick, or 0.05 secs, to complete. This is inconsistent with the behavior of the redstone functions on a computer, which are instant.

Steps to reproduce

Run this script on a computer with a redstone integrator attached:

local rsint = peripheral.find("redstoneIntegrator")
local t = os.clock()
rsint.setOutput("back", true)
print(os.clock() - t)

Expected result: prints 0
Actual result: prints around 0.05

Multiplayer?

No

Version

1.18.2-0.7.20r (Latest 1.18)

Minecraft, Forge and maybe other related mods versions

Forge 40.1.86 Minecraft 1.18.2 CC: Tweaked 1.101.0

Screenshots or Videos

No response

Crashlog/log

No response

commented

In general, methods which are runned on the main thread (We need to do that, so we can do stuff with the world) take a tick to be executed.

commented

I have no idea if this is feasible, but couldn't the redstone setting functions just set some sort of variable/tag/value on the redstone integrators, such that setting values on several redstone integrators is instant, and then when the next redstone tick arrives, all the redstone integrators activate with the values given previously?

commented

I have no idea if this is feasible, but couldn't the redstone setting functions just set some sort of variable/tag/value on the redstone integrators, such that setting values on several redstone integrators is instant, and then when the next redstone tick arrives, all the redstone integrators activate with the values given previously?

Yeah. I thought about that too.
I'll use this week to work on that