
Chess
A plugin that features a working Chess board using dialogs and a resourcepack
Список изменений
Chess v1.0.3
Chess v1.0.3 fixes two premove bugs from v1.0.2 — castling could not be queued as a premove, and premoving a capture onto a checked king drew a missing-glyph box — and adds an opt-in vertical castling easter egg. Internally the chess engine now lives inside the plugin, so Chess no longer depends on an external engine artifact.
Fixed
- Castling is premovable again: Castling could not be queued as the first premove. The premove generator offered a king only its eight adjacent squares, so the two-square castling destination was rejected and the whole queue was cancelled. Because only the head of the queue is validated at queue time, castling already worked from the second position onwards, which is why this went unnoticed in v1.0.2. Both premove generators now offer castling: the one used for a selected piece, and the one used for a ghost selection on the projected board.
- Premoving a capture onto a checked king no longer renders a raw glyph box: That square is both the checked king's square and a premove destination, so it took the red check wash while displaying the capturing piece as a ghost. The pack bakes the check wash for the two kings only — nothing else can be in check — so the result was a request for a codepoint the pack does not declare, and the client drew a tofu box. Such a square now stays premove blue and shows the ghost piece, which is also what it means: by the time the premove plays, the king may have moved away. Premove source squares follow the same rule, so a king premoved out of check shows its origin in premove blue rather than check red.
Added
- Vertical castling easter egg (
easter-egg.enable-vertical-castling, defaultfalse): The Pam-Krabbé castling. Promote a pawn to a rook on your king's own file and that rook has never moved, so the king may castle with it straight up the board — the king moves two squares towards it and the rook lands on the square the king crossed. WhiteKe1with a promoted rook one8becomesKe3,Re2; Black castles the same way down the board. Every normal castling restriction still applies: the king must not have moved, the file between them must be empty, and the king may not castle out of, through, or into check. Both squares up the file highlight — the first as an ordinary king step, the second as the castle — and the move is premovable like any other castling.
Changed
- The chess engine is now vendored in-tree: The engine's rules, board, and game implementations
live in the plugin under
codes.castled.chess.engine, the same package the build previously relocated them to. The shipped JAR layout is unchanged, and the plugin still has no runtime engine dependency. Chess no longer needs the externalpocket-chess-apiandpocket-chess-commonartifacts, and the Guice compile dependency is gone with them. - Castling is derived from board geometry rather than fixed squares: Move results now carry the rook's half of a castling move instead of a flag, so the rook's squares are no longer re-derived from the king's destination file. Castling rights track unmoved rooks by square rather than king-side and queen-side flags. Standard and vertical castling run through the same code.
- Promotion is applied by the engine: Choosing a promotion piece previously wrote to the board directly, so the engine never learned a promotion had happened. It now goes through the engine, which is what lets a promoted rook count as never having moved.
Resource Pack
- The pack namespace changed from
pocketchesstochess.assets/pocketchess/is nowassets/chess/, and the board font is addressed aschess:board. Everything inside the pack already used theminecraftnamespace and is unaffected. - The
pack.mcmetadescription is nowChess, replacing a leftover generated string. - No textures or codepoints were added or removed this release.
The pack SHA-1 has therefore changed and clients will redownload it, even though the board looks identical.
Configuration
settings.yml gains an easter-egg section:
easter-egg:
enable-vertical-castling: false
Existing installs do not need editing. Chess merges any keys missing from an on-disk config with the bundled defaults at startup, so the new section is added automatically and the easter egg stays off until it is switched on.
Commands
/chess duel <player> <time>
/chess accept <player>
/chess decline <player>
/chess watch <player>
/chess open
/chess help
Commands are unchanged from v1.0.2.
Verification
- 35 tests pass across four suites:
CastlingTest(23),PremoveTest(8),GlyphPackContractTest(3), andDialogContentGrowthTest(1). CastlingTestcovers standard king-side and queen-side castling, blocked paths, castling through an attacked square, lost rights, the vertical easter egg on and off, and the premove behaviour of each.GlyphPackContractTestis new. It walks every combination of piece, highlight, and square colour and asserts the resource pack declares the codepoint the plugin emits. A missing glyph is invisible to every other test — the dialog still builds and only a screenshot shows the damage — so this pins the contract between the code andboard.json.gradle clean buildsucceeds.
Upgrade Note
Replace the previous Chess.jar and fully restart the server. Chess will overwrite
plugins/Chess/resourcepack.zip with the updated bundled pack during startup.
Because the pack's asset namespace changed, this release requires the updated pack to reach
clients; running v1.0.3 against the v1.0.2 pack leaves the board font unresolved, and pieces will
not render correctly. If ResourcePackManager merges the Chess pack, allow it to rebuild and
redistribute the combined pack. If the pack is hosted or merged manually, replace that external
copy with the new plugins/Chess/resourcepack.zip. Players may need to reconnect after the
updated pack is available.
Chess v1.0.3 continues to target Paper 1.21.11, Java 21, and compatible Folia servers.
