Files
VotingPlugin/docs/neoforge-bootstrap.md
T

4.5 KiB

NeoForge bootstrap status

The single VotingPlugin.jar now contains an experimental NeoForge 21.1 entry point for Minecraft 1.21.1. This bootstrap does not receive or process live votes and does not execute rewards. Bukkit and proxy behavior remains on its existing paths.

On server start, the entry point creates config/votingplugin/, installs the packaged Config.yml and VoteSites.yml only when missing, reads them, and opens the existing AdvancedCore SQLite user backend in VotingPlugin.db. The bootstrap currently accepts DataStorage: SQLITE only. Its separate VotingPlugin_NeoForgeUsers table stores the player name, all-time/monthly/daily/weekly totals, points, and per-site last-vote timestamps needed by the shared accounting step. Existing UUID-only bootstrap tables are extended in place. The accounting adapter is a storage foundation and is not wired to live vote ingress. The runtime closes the backend and clears queued tasks and online player identities on server stop.

The NeoForge bridge tracks login/logout identity and runs submitted bootstrap tasks on server ticks. Player identity access uses reflection because NeoForge's published universal Maven JAR does not include Minecraft classes on Maven's compile path; these method names were checked against the installed 1.21.1 server JAR.

An internal synthetic vote boundary now supports identity and enabled-site resolution, Bukkit-compatible vote-delay decisions, and the existing shared totals/points policy in one atomic SQLite transaction. ACCOUNTING_ONLY is deliberately an internal test/migration scope and returns ACCOUNTED, rather than claiming that a production vote completed. COMPLETE votes do not change timestamps, totals, or points. They are retained in an ordered SQLite inbox under their stable vote ID until NeoForge implements rewards, offline queues, vote party, broadcasts, streaks, milestones, cooldown actions, post-vote events, and placeholder updates. Repeated submission of the same vote ID is idempotent even after player or site state changes. The inbox admits at most 64 votes per player and 4,096 votes across the runtime. A full inbox returns an explicit capacity result that a future ingress must treat as non-success.

Native ingress remains disabled. VotifierPlus's hardened packet handling is currently packaged with its Bukkit, BungeeCord, and Velocity plugin runtime rather than as a platform-neutral API that this single VotingPlugin artifact can reuse. Depending on that full plugin would pull unrelated platform code into VotingPlugin, while copying its security-sensitive protocol implementation would create a second implementation. The deferred inbox is the smaller prerequisite: a later reusable protocol boundary can retain a complete vote before acknowledging it.

Deferred votes can now be claimed in memory and completed through one SQLite transaction that writes a completion receipt and removes the pending payload. An abandoned claim leaves the durable payload pending, while a committed transaction leaves no pending-without-receipt window. Completion receipts are bounded to 4,096 per player and 262,144 across the runtime. They are not evicted by age because no native ingress acknowledgement can yet prove that a sender has stopped retrying. If either receipt limit is full, completion stops and keeps the original pending payload. A later ingress handshake may add safe receipt release with a bounded post-release tombstone, following the existing proxy delivery pattern. This lifecycle does not execute rewards or accounting yet.

SharedVoteProcessor.Operations was reviewed operation by operation. NeoForge can currently implement its configuration, identity, site, delay, timestamp, and accounting operations. Logging and proxy-only identity fields have no processing effect at this internal non-proxy boundary. Reward delivery, offline queuing, vote party, broadcast, inventory/effects, streak, milestone, cooldown, post-event, and placeholder operations require future platform services. The adapter therefore reuses SharedVoteIdentity, SharedVoteInput, SharedVotePolicy, and SharedVoteAccounting without implementing the broad Bukkit production interface with false no-ops.

Validation for this step covers unit startup/shutdown, isolated classloader startup/shutdown from the packaged JAR, and a NeoForge 21.1.211 dedicated server smoke run. The server reached its ready state, initialized the bootstrap, and exited cleanly after stop. This does not verify player joins, vote receipt, or rewards.