▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Redstonecompiler
Redstonecompiler

Redstonecompiler

JIT-compiles redstone circuits to bytecode for faster large machines.

Оцените первым
134
5
Все версии→Redstonecompiler 0.2.0-alpha

Redstonecompiler 0.2.0-alpha

Alpha09.06.2026

Список изменений

Critical Bug Fixes (3)

Bug 1 — Output power discarded CircuitManager.applyOutput() called updateNeighborsAlways() without actually setting the redstone signal strength. The power value computed by the compiled circuit was silently dropped.

Fix: replaced with world.setBlockState(pos, state.with(POWER, clamped), 2) — actually writes the signal value.

Bug 2 — Input captured stale value RedstoneWireMixin injected at HEAD and called ci.cancel(), but state.get(POWER) returned the pre-update value. Vanilla's recalculation never had a chance to run.

Fix: added @Invoker("getReceivedRedstonePower") to directly call the vanilla private method for the correct input signal strength.

Bug 3 — Self-triggered infinite loop applyOutput → setBlockState → triggered neighborUpdate → Mixin intercepted again → called onInputChanged…infinite recursion.

Fix: added ThreadLocal<Boolean> APPLYING_OUTPUTS re-entrancy guard, checked in all 3 Mixins (RedstoneWireMixin, BlockChangeMixin).

Mixin Strategy Optimization

  • Before: intercepted ALL circuit wire neighborUpdate calls, cancelled everything → signals couldn't propagate correctly
  • After: only intercepts INPUT nodes (wires receiving external signals); non-input nodes pass through to vanilla logic normally

Other Improvements

  • executedThisTick deduplication: same circuit won't execute twice in the same tick
  • BlockChangeMixin: added isApplyingOutputs() guard to prevent self-invalidation during output application

Файлы

redstonecompiler-0.2.0-alpha.jar(106.90 KiB)
Основной
Скачать

Метаданные

Канал релиза

Alpha

Номер версии

0.2.0-alpha

Загрузчики

Fabric
Quilt

Версии игры

1.20.1

Загрузок

37

Дата публикации

09.06.2026

Загрузил

ID версии

Главная