COWMODSКаталог модов

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.

Автор: modmass3022обновлён 19 июл. 2026 г.
Механики игрыОптимизацияУтилиты

Описание

RedstoneRegions

Per-chunk redstone engine switching for Folia. Mark a chunk and its wire ticks 2-14× faster; everything else stays vanilla.

If you've run a big server you know the tradeoff. You can set redstone-implementation: alternate-current in paper-world.yml and get a huge speedup globally. Then some player's piston BUD farm from 2019 quietly stops working and you spend a week figuring out why. Or you keep everything vanilla and watch a 64×64 dust floor eat your tick budget. It's an all-or-nothing switch, and neither "all" nor "nothing" is what you actually want.

So this makes it per-chunk instead:

/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 choice persists (stored in chunk PDC), survives restarts, and hot-swaps live, no restart or chunk reload needed.

The four engines

ModeSpeedNotes
vanilla1×the default. Everything behaves like normal Minecraft.
alternate-current2-14×Space Walker's algorithm. Two known edge cases, see below.
eigencraft3-5×almost no edge cases. Good for piston/observer machinery.
disabledfrozenwire never updates. For archived builds you want inert.

Numbers

My benchmark is a 32×32 dust grid, toggled from one lever:

RunVanillaAC
Cold234 ms22 ms10.6×
Warm JIT41 ms14 ms2.9×
Pre-warmed71 ms5 ms14.2×

The honest takeaway: the "14×" happens when vanilla is at its worst, steady-state is more like 3×. Either is a lot when the vanilla number blows a 50 ms tick. At 64×64 chunks of dust, vanilla overshoots a tick by 6×; AC stays under 2.

Cost when you're not using it: every wire update passes through a per-chunk dispatcher, which is a StampedLock optimistic read plus a switch, about 50 ns. If even that bothers you there's timing.mode: sample (~5 ns at sample-rate 10) or off (nothing at all).

What's in the box

The core is the per-chunk switching. Around that, mostly things I ended up needing while running it:

  • WorldEdit selection support, so you can flip a whole machine room from //pos1 //pos2
  • a BlueMap overlay that draws colored rectangles over non-vanilla chunks, which turned out to be the fastest way to spot "wait, why is that chunk on AC"
  • an optional auto-scanner that flips chunks to AC when their vanilla redstone time crosses a threshold
  • [ac] signs so trusted players can flip their own chunks without bugging staff (permission-gated, radius-capped)
  • /redstone-region profile for a live per-chunk readout against the 50 ms budget
  • /redstone-region why x y z, which explains a wire's power level by walking its six neighbors. Sounds silly, saves so much time debugging
  • /redstone-region undo for the last batch, whatever caused it (set, fill, selection, sign, auto-scanner)
  • an audit log (JSONL, rolled daily, actor + UUID + reason on every flip) and an optional Discord webhook, because on a real server people will ask who touched their chunk
  • PlaceholderAPI placeholders, click-to-teleport chunk coordinates in chat, hot config reload
  • English and French included; drop a lang/<code>.yml for anything else

Install

Jar in plugins/, restart, stand somewhere, /redstone-region set alternate-current. That's the whole thing.

Requirements: Folia 1.21.11 build 6 or later (Luminol and other forks work), Java 21. BlueMap 5.16+, PlaceholderAPI 2.11.7+ and WorldEdit 7.3.19+ are all optional. For WorldEdit, prefer a Folia-patched build.

Does it actually behave like vanilla?

This was the part I was paranoid about, so there's an in-server test harness. Current results, 14/14:

  • byte-for-byte parity with vanilla across 8 contraptions over 60+ ticks each: dust line, 16×16 grid, 4-tick repeater clock, AND gate, comparator subtraction, torch ladder, torch inverter, dust zigzag
  • 596 toggles in a 30-second stress run, zero exceptions
  • 780 + 780 toggles running in two different Folia regions at the same time, zero races, zero thread-check failures (this is the case Paper's bundled AC can't currently pass under Folia)
  • 655 dispatches into the AC engine confirmed by counter, so the routing isn't silently falling back

How it works, short version

As of 1.21.2 Mojang exposes a RedstoneWireBlock.evaluator field. At boot we swap it for a dispatcher that checks the chunk's flag and routes the update to the right engine. The AC engine is a port of Space Walker's algorithm, modified to use per-thread WireHandlers. The bundled AC in Paper shares one handler across everything, which is a latent race once Folia runs regions in parallel.

Longer version with diagrams: docs/ARCHITECTURE.md.

The edge cases, honestly

Two patterns behave differently under AC and can break:

  1. piston BUDs that depend on the wire's self-shape-update at intermediate power levels
  2. observers counting power-level transitions on a wire

/redstone-region check scans a chunk and warns about both patterns before you flip it. If it finds something, either leave that chunk vanilla or use eigencraft, which has neither problem and is still 3-5× faster. That combination covers basically every machine I've come across.

Links

License

MIT. The bundled Alternate Current engine is also MIT. That's Space Walker's work, license in ac/LICENSE.

Последние версии

Все версии →
release

RedstoneRegions 0.2.3 (MC 26.2)

0.2.3+26.2
19 июл. 2026 г.106Minecraft: 26.2folia, paper, purpur
Скачать
Что нового
Support Minecraft 26.2 (Paper / Folia / Purpur). Recompiled against the 26.2 API (adventure 5.2.0). Redstone keeps working across Folia region boundaries. Boot-tested green on Paper 26.2, Folia 26.2, Purpur 26.2 and Lophine 26.2.
release

RedstoneRegions 0.2.2 (MC 26.1.2)

0.2.2
2 мая 2026 г.77Minecraft: 26.1.2folia, paper, purpur
Скачать
Что нового
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.
release

RedstoneRegions 0.2.1 (MC 26.1.2)

0.2.1
1 мая 2026 г.22Minecraft: 26.1.2folia, paper, purpur
Скачать
Что нового
Patch on 0.2.0 fixing two production bugs: 1. **Discord webhook 429 fix.** The 429 rate-limit branch was unreachable (caught earlier by an `if statusCode/100 == 4` that 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. 2. **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). 3. **Plugin display name** now `RedstoneRegions` in /plugins, /version, /pl, etc. — matches the Modrinth title. Was `folia-redstone-region`. Same feature set as 0.2.0. 14/14 harness still green.
release

RedstoneRegions 0.2.0 (MC 26.1.2)

0.2.0
1 мая 2026 г.29Minecraft: 26.1.2folia, paper, purpur
Скачать
Что нового
## 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.
release

RedstoneRegions 0.1.0

0.1.0
1 мая 2026 г.68Minecraft: 1.21.11folia, paper, purpur
Скачать
Что нового
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/<code>.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.