
RedstoneRegions
Per-chunk redstone speed-up on Folia (2-14× faster). Pick vanilla / Alternate Current / Eigencraft / Disabled per chunk. /undo, sign opt-in, BlueMap, WorldEdit, PAPI, en+fr.
- Загрузки
- 65
- Подписчики
- 1
- Обновлён
- 2 мая 2026 г.
- Лицензия
- MIT
Опубликован 1 мая 2026 г.
🔌 Per-chunk redstone speed-up.
Mark a chunk → it ticks 2-14× faster. Leave the rest vanilla.
Server admins know the dilemma: globally enable Alternate Current and 1% of your machines break, OR keep vanilla everywhere and watch big redstone choke the server. RedstoneRegions ends the dilemma.
Per-chunk choice. Four engines. Hot-swap. Folia-thread-safe.
/redstone-region set alternate-current ← this chunk only
/redstone-region fill 8 alternate-current ← 17×17 chunks around you
/redstone-region selection eigencraft ← your WorldEdit selection
/redstone-region undo ← oh wait, no
⚡ The four engines
| Mode | Speed | Edge cases | Use for |
|---|---|---|---|
| vanilla | 1× (baseline) | none | default; everything works |
| alternate-current | 2-14× faster | piston BUDs, observer-on-wire | dust-heavy mega-bases, sorters, salles des coffres |
| eigencraft | 3-5× faster | very few | hot piston/observer machines |
| disabled | n/a (frozen) | wire never updates | archive zones, dead builds |
📊 Performance — 32×32 dust grid
| Run | Vanilla | AC | Speedup |
|---|---|---|---|
| Cold | 234 ms | 22 ms | 10.6× |
| Warm JIT | 41 ms | 14 ms | 2.9× |
| Pre-warmed | 71 ms | 5 ms | 14.2× |
At 64×64 chunks of dust, vanilla overshoots one tick by 6×. AC keeps it under 2.
Every wire update goes through a per-chunk dispatcher with ~50 ns total overhead (StampedLock optimistic read + a switch). Tunable via timing.mode: sample for huge grids — drops to ~5 ns at sample-rate 10. Or off for 0 ns.
🛠 Features
- 🎯 Per-chunk control —
/redstone-region set aconly where you need it - 💾 Persistent — survives restarts, lives in chunk PDC
- 🧵 Folia-thread-safe — per-region WireHandlers, validated by 14/14 cross-region stress tests
- 🗺️ BlueMap overlay — colored chunk rectangles, see your perf zones at a glance
- ✏️ WorldEdit selection —
/redstone-region selection acfrom your//pos1 //pos2 - 🪧 Sign opt-in — players can place
[ac]signs to flip their own chunks (perm-gated, radius-capped) - 🤖 Auto-AC scanner — hot vanilla chunks auto-flip, threshold configurable
- 📊 Live profiler —
/redstone-region profilegives a 50ms-tick-budget readout per chunk - 🔍
/redstone-region why x y z— explains a wire's current power by enumerating its 6 neighbors' contributions - ↶
/redstone-region undo— reverses the last batch (set / fill / selection / sign / auto-AC) - 🌍 i18n — English + French built-in, drop your own
lang/<code>.yml - 📝 Audit log — JSONL, daily-rolled, every flip with actor + UUID + reason
- 🔔 Discord webhook — async notifications on flip, filterable
- 📈 PlaceholderAPI —
%redstone-region_mode%, count placeholders per mode - ⚡ Click-to-tp chunk coords in chat
- 🔧 Hot reload —
/redstone-region reloadfor config + lang, no restart
🚀 Quick install
- Drop
redstoneregions.jarinplugins/ - Restart server
- Stand in a chunk, type
/redstone-region set alternate-current. Done.
✅ Requirements
- Folia 1.21.11 (build #6+) — Luminol and other Folia forks tested working
- Java 21+
- Optional: BlueMap 5.16+, PlaceholderAPI 2.11.7+, WorldEdit 7.3.19+ (Folia-patched preferred)
🧪 Validated
14/14 in-server harness cases green:
- byte-for-byte parity with vanilla on 8 contraptions over 60+ ticks each (dust line, 16×16 grid, 4-tick repeater clock, AND gate, comparator-subtract, torch ladder, torch inverter, dust zigzag)
- 596 toggles in 30s stress, 0 exceptions
- 780 + 780 toggles in two different Folia regions in parallel, 0 races, 0 thread-check failures
- 655 AC dispatches verified by counter
🎓 How it works (TL;DR)
Mojang exposed a RedstoneWireBlock.evaluator field in 1.21.2. We swap it at boot with a DispatchingEvaluator that consults a per-chunk flag (PDC-stored) and routes each wire update to the right engine. The Alternate Current implementation is a port of Space Walker's algorithm with per-thread WireHandlers to avoid the latent race in Paper's bundled-AC under Folia.
Full architecture: docs/ARCHITECTURE.md.
⚠️ Honest about edge cases
Two contraption patterns differ from vanilla under AC and may break:
- Piston BUDs that rely on the wire's self-shape-update at intermediate power levels
- Observers that count power-level transitions on a wire
Run /redstone-region check first → it warns about risky patterns. Or just keep that chunk vanilla. Eigencraft mode has neither edge case while still being 3-5× faster — use it for piston/observer machines.
🌐 Links
📜 License
MIT. Bundled Alternate Current engine: MIT (Space Walker — see plugin's ac/LICENSE).
If you've ever typed redstone-implementation: alternate-current in paper-world.yml and held your breath, this plugin is for you.
Ченджлог
0.2.2Релиз26.1.2 · 2 мая 2026 г.
Trivial filename rename release. The jar is now RedstoneRegions-0.2.2.jar (was plugin-0.2.2.jar on the Modrinth CDN due to a Gradle subproject naming quirk). No functional changes vs 0.2.1.
0.2.1Релиз26.1.2 · 1 мая 2026 г.
Patch on 0.2.0 fixing two production bugs:
Discord webhook 429 fix. The 429 rate-limit branch was unreachable (caught earlier by an
if statusCode/100 == 4that disabled the webhook on the first burst). Now: 429 is handled FIRST with proper Discord retry_after parsing + back-off + retry; only OTHER 4xx codes disable the webhook.Coalescing window. /fill 8 alternate-current (= 289 chunks) used to produce 289 webhooks → instant rate-limit + ban. Now: events within a 2.5s window sharing (actor, source, dim, target-mode) are batched into ONE message with chunk range + block range + tp-center coords. Plus a true 5 req/s rate (250ms sleep between consecutive POSTs, not just per-drain).
Plugin display name now
RedstoneRegionsin /plugins, /version, /pl, etc. — matches the Modrinth title. Wasfolia-redstone-region.
Same feature set as 0.2.0. 14/14 harness still green.
0.2.0Релиз26.1.2 · 1 мая 2026 г.
0.2.0 — Minecraft 26.1.2 / Luminol
This build targets MC 26.1.2 only. For 1.21.11 servers, stay on 0.1.0.
- Compile target: Mojang 26.1.2 mojmap, Java 25 (Mojang requirement)
- Tested on Luminol dev/26.1.x (commit 2b6ba226), 14/14 harness cases green
- paper-plugin.yml api-version bumped 1.21 → 26.1
- Build pipeline: paperweight-userdev replaced by direct dependency on a Luminol dev-bundle built locally (see docs/BUILDING.md); Folia officiel hasn't published a 26.x dev-bundle yet, paperweight 2.0-SNAPSHOT chokes on the new paperclip format
- Same feature set as 0.1.0: 4 redstone modes per chunk, 15 commands, i18n en/fr, BlueMap+WE+PAPI integrations, audit log, sign opt-in, auto-AC scanner, undo, why, etc.
Validation: parity byte-for-byte on 8 contraptions over 60+ ticks each, 601-toggle stress with 0 exceptions, cross-region stress 800+801 toggles in parallel with 0 races, 655 AC dispatches verified.
Reminder: Mojang requires Java 25+ from 26.1.2 onward. Old Java 21 setups will see 'class file version 69.0' errors.
0.1.0Релиз1.21.11 · 1 мая 2026 г.
Initial public release.
Features:
- 4 redstone engines per chunk: vanilla, alternate-current, eigencraft, disabled
- Folia-thread-safe (per-thread WireHandlers)
- 15 commands: info / set / fill / clear / list / where / map / stats / check / profile / why / selection / undo / reload / help
- Sign opt-in [ac] / [vanilla] / [eigencraft] / [disabled] (radius-capped)
- Auto-AC threshold scanner (config-gated)
- Audit log (JSONL, daily rolled)
- Soft-deps: BlueMap (chunk overlay), PlaceholderAPI, WorldEdit (selection), Discord webhook
- i18n: English + French built-in, lang/
.yml override supported - Click-to-tp on chunk coords in chat
- Configurable timing instrumentation (all / sample / non-vanilla-only / off)
- bStats id 31033
Validated by 14/14 in-server harness cases including byte-for-byte vanilla parity on 8 contraptions, cross-region stress (2 Folia regions in parallel, 0 races), and a counter assertion that the AC code path is actually exercised.
See https://github.com/uncaney/folia-redstone-region for full docs.
Комментарии
Загружаем…