ColonyLink v1.6.4 - cancel request + substitution scope
Changelog
[1.6.4]
Added
- Cancel Request button. A small red "×" in the top-right of the Priority Request
line cancels that builder's current priority request through MineColonies' request
system —colony.getRequestManager().updateRequestState(token, RequestState.CANCELLED),
a 1:1 mirror of the builder's native GUI cancel (UpdateRequestStateMessage). The
request may be re-created later by MineColonies, same as the native behavior. Hover
shows "Cancel this request". - Config:
[tools] tool_substitution_in_list(SERVER, defaultfalse). Controls
whether tool substitution applies to the resource list. Default keeps substitution on
the Priority Request line only.
Changed
- Tool substitution is Priority-Request-only by default. With
tool_substitution_in_list = false, resource-list rows now show and send the original
requested item (display and send stay faithful). Set ittruefor the pre-1.6.4
behavior (also substitute in the list). The Priority Request line is unaffected and
keeps substituting. Both the display site and the send-side substitution are gated by
the toggle, so a list send never re-substitutes behind the displayed item.
Security
CancelRequestPacket— client is never authoritative. ValidatesredirectorPos
against the player's own wand (getBuilderEntries, the same model as
WarehouseCraftHandler/SendToWarehousePacket) with a dimension guard, derives the
builder position from the validated wand entry (never a client-supplied builder
position), and requiresACCESS_HUTSserver-side. The target request is re-derived
server-side (first non-CANCELLED/OVERRULEDIDeliverableopen request, mirroring
fetchBuilderRequestpass 1) — no request token is sent over the wire, and there is no
match against the displayed, possibly tool-substituted item.
[1.6.3]
Fixed
- Priority Request anti-cascade restored in the default BUILDER mode. The greyed-out
"Sent" (SENT_PENDING) state on the Priority Request line was only rendered in
WAREHOUSE mode — a regression that silently dropped the v1.6.1 fix when the source was
re-fetched from a stale base. The sent-key was still written but never displayed, so
fulfilling an open request (tool, armor, food) left the line clickable and drained the
ME network on repeated clicks. Most visible when a builder got low on saturation and a
food request appeared. The "Sent" state now renders in both delivery modes; the two
pass-1 sites carry an anti-regression comment. - Send-to-builder validation aligned with what is displayed. The v1.6.2 legitimacy
check usedIDeliverable.matches(), which is stricter than the display path
(fetchBuilderRequestderives the line fromgetDisplayStacks(), notmatches()).
Some open requests (notably tools and food) were shown on the Priority Request line but
rejected as "not needed" on send.matchesOpenRequestnow also accepts the exact
display stack the line offered (components matched, count ignored).
[1.6.2]
Security, robustness and quality release. Headline change is a server-configurable
delivery mode; the rest hardens the server-side surface, fixes several bugs and completes
translations. Default behavior is unchanged for legitimate single-player / trusted-server
use.
Multiplayer / dedicated servers: this release closes several server-side exploits
reachable by a modified client (see Security). Client and server must both run v1.6.2+
(network protocol bumped to 2).
New — Delivery target (server / modpack setting)
Builder resources can be delivered in one of two ways, chosen server-side via the
[delivery] send_target option in colonylink-server.toml:
BUILDER(default) — inserted directly into the Builder's Hut, bypassing the
courier. Fast, hands-off.WAREHOUSE— placed into the colony Warehouse; a MineColonies courier delivers to
the builder. Slower, keeps couriers relevant — recommended for balanced modpacks.
The option is authoritative and synced to every client on join (no longer overridable
client-side). Enum-based, so future modes can be added without breaking configs. In
WAREHOUSE mode, sent resources show a greyed "Sent" line until the courier delivers
(tracked per wand, survives relogs, clears on reconcile); tool substitution is disabled
in this mode so the courier receives exactly what was requested.
Config migration: configuration moved from
COMMONtoSERVERtype.
colonylink-common.tomlis abandoned and a freshcolonylink-server.tomlis generated —
re-apply custom values there. Synced server→client on login. Runtime
/colonylink config setapplies immediately; connected clients pick up new values on
reconnect. Modpacks can ship defaults viadefaultconfigs/colonylink-server.toml.
Security (server-side, dedicated-server relevant)
All reachable by a modified client prior to v1.6.2; now closed. Legitimate play is
unaffected.
- Terminal — remote ME/warehouse drain (critical).
TerminalTransferPacket+
resolvePart()trusted a client-suppliedhostPos/sidewithout checking the player had
that terminal open or was in range; ME transfers usedIActionSource.ofMachine
(bypassing AE2 security);checkPermission()failed open. A modified client could drain
any ME network hosting a Warehouse Link Terminal, from anywhere, without opening the GUI.
Fix:resolvePartrequiresplayer.containerMenuto be the matching
WarehouseLinkTerminalMenufor that exact part; menus enforce an 8-block range; ME
access usesIActionSource.ofPlayer(AE2 security applies);checkPermissionfails
closed. - Wand — server crash / self-brick (critical). An unbounded
activeTabIndexreached
allEntries.get(st)with a negative index, throwing every tick; persisted to NBT, it
also crashed on every normal GUI open. Fix: clamped on receipt (sanitizeTab,
preserving theInteger.MAX_VALUECitizens sentinel), ingetActiveTab(), and at the
tick read site. - Craft-from-Warehouse — cross-colony theft (critical).
WarehouseCraftHandlerused a
clientredirectorPoswith no validation and noACCESS_HUTS, moving warehouse items
into the caller's ME for free. Fix: requiresACCESS_HUTS, validates the redirector
is linked to the player's wand, chargescraft_cost_rf. - Send-to-Builder — arbitrary ME extraction (high). The BUILDER path never validated
the item was needed. Fix: accepts only a missing material, a live open request, or a
valid tool/armor substitute for one of those — validation on the original requested item,
before substitution; fails safe. - Builder restart (high).
RestartBuilderPacketreset any builder's work order with no
permission check. Fix: requiresACCESS_HUTS. - Warehouse-priority toggle (high).
WarehousePriorityPackettoggled a redirector with
no permission/ownership check. Fix: validates the redirector belongs to the player's
wand. - Packet input validation. Enum ordinals and craft counts were unbounded, craft lists
could be empty, player casts unchecked. Fix: ordinals bounded, counts clamped to
[1, 1_000_000], empty lists rejected,instanceof ServerPlayerguarded.
Fixes
- Domum queue shared per ME network. Queuing a Domum block shows it on every Warehouse
Link Terminal on the same network (shared cable, Quantum Ring, etc.), backed by a
per-grid server-sideDomumQueueManagerwith each terminal's NBT copy as a persistence
net; survives relogs/reconnects; each terminal clears an entry once its pattern is
encoded. - Priority Request line — no more cascade. Fulfilling an open request greys the line
"Sent" and disables the button until MineColonies reconciles, instead of cascading and
draining the ME. (v1.6.3 restores this for BUILDER mode.) - RF bar display. Lowering capacity below a wand's stored charge no longer overflows the
bar / reads over 100% (display clamped; stored self-corrects on the next energy op). - Domum craft — zero-voiding. Materials AE2 pulled for a craft that can't be rebuilt are
returned to the ME network instead of lost.
Robustness & performance
- Defensive config reads (
safeGet) on energy capability paths — no "config not loaded"
off-world. - Terminal and Redirector GUIs close when the player moves out of range (8 blocks).
- Citizens tab throttled (per-viewer signature) instead of a full scan every tick.
- Zero-voiding contract verified on all ME re-insert paths.
Cleanup
- Externalised all remaining hardcoded English chat messages (5 languages, verified key and
format-specifier parity). - Removed dead code (
ColonyLinkWandCharger,findTerminalPartForLevel, unused
constants/fields/import) and the never-called CuriosregisterCurio()(the wand remains
equippable via Curios 9.x data tags). - Redirector item buffer fixed at 3×9 (27 slots); non-functional
redirector_buffer_rows/cols
options removed.
Translations
English, French, Spanish, Russian and Chinese are in full parity. Translations are written
by Claude (Anthropic) and may be imperfect — corrections welcome via a GitHub pull request
(give the line number and the corrected value) or on Discord.