Commit Graph

22 Commits

Author SHA1 Message Date
laforetbrut
13de5b65c0 Fix backpack/curios dup, perf overhaul, drop chat+cobblemon
Root cause of backpack duplication: Sophisticated Backpacks'
setBackpackContents merges shallowly when the UUID exists, so stale
sub-tags survived every restore. doBackPackRestore now calls
removeBackpackContents before setBackpackContents for a clean replace.

Curios cosmetic stacks (getCosmeticStacks) are now snapshotted, applied,
restored and cached on all paths. Old-format rows without the "cos:"
prefix still parse unchanged, so existing DB data is preserved on upgrade.

closeContainer no longer matches by class-name substring (was closing
unrelated mod menus containing "curio"/"accessor"). Only menus whose
slots reference the disconnecting player's inventory/ender-chest are
closed.

Thread-safety: Sophisticated Storage contents are now snapshotted on the
main thread (snapshotSSData + saveSSSnapshots) instead of read from a
background thread racing with world ticks.

Event priority / defensive guards:
- onPlayerDeath is now EventPriority.LOW and skips cancelled events so
  Revive Me / Corail Tombstone's cancel runs first.
- onServerStarting short-circuits on integrated (single-player) servers
  to avoid noisy MySQL connection attempts.

Observability:
- executeBatchTransaction now returns per-statement row counts.
- writeSnapshotToDB calls SyncLogger.guardBlocked when the core UPDATE
  silently no-ops (another server claimed last_server).
- SyncLogger uses a daemon scheduler that flushes every 500 ms; shutdown
  happens after parallel saves so final save logs are no longer dropped.
- Rollback failures inside executeBatchTransaction and
  refreshInventoryForInputOutput are now logged instead of swallowed.

HikariCP retuned: maxPoolSize 25->15, connectionTimeout 30->10s,
idleTimeout 600->300s, leakDetectionThreshold 10->25s (covers worst-case
join polling without log spam).

New table_prefix config option (Tables helper) lets a user share one
MySQL database with other mods without table-name collisions. Default
is empty to preserve backward compatibility.

Reflection Methods for NeoForge AttachmentHolder are resolved once in
a static initializer and cached.

Chat sync and Cobblemon integration removed:
- Chat sync: 319 LoC of socket/thread code guarded by a config flag that
  defaulted to false; orphaned config keys are silently ignored by the
  NeoForge ModConfig loader, so no crash on upgrade.
- Cobblemon: 297 LoC of mixins that ran synchronous JDBC on the main
  thread and built SQL with raw UUID concatenation. The existing
  cobblemon table in the DB is left untouched on upgrade.

Also fixes cobblemon ALTER TABLE running blindly on every boot
(alterColumnIfNeeded helper checks INFORMATION_SCHEMA first).

Author: vyrriox
2026-04-22 02:50:26 +02:00
mlus
e373b8c226 add cobblemon support(in test) 2025-12-15 22:47:47 +08:00
mlus
29da0f28ad recently commit port 2025-11-28 21:00:25 +08:00
mlus
0562b01138 Full tested ChatSync Feature 2025-06-05 12:43:41 +08:00
EoD
6ac6f297af encode unknown items using Paper
This allows using PlayerSync with different minecraft versions and
even different sets of mods.

All unknown items are replaced by Paper with its original NBT data
encoded into the paper item.
2025-05-04 16:48:57 +00:00
EoD
8869e26f48 migrate from ForgeGradle to ModDevGradle legacy 2025-05-02 22:40:39 +00:00
EoD
39239fbb64 add issue tracker to mods.toml 2025-05-01 16:34:23 +00:00
EoD
2331485970 make sure the MySQL dependency is installed 2025-05-01 16:09:57 +00:00
EoD
795ca6cedf fix clients to require PlayerSync to be installed 2025-04-25 20:36:40 +00:00
EoD
086374eeb1 bump gradlew and update mod config 2025-04-23 22:10:48 +00:00
mlus
37218c4c58 fixed #16 2024-05-03 16:14:21 +08:00
mlus-Asuka
d32ae52537 update 1.2.1 2023-09-29 16:50:26 +08:00
mlus-Asuka
5de0fdcff6 update 1.20.1 2023-09-22 12:07:58 +08:00
mlus-Asuka
5ef817a9b7 Use HikariPool instead of original driver.Merge Fork from KK1ve. 2023-08-03 22:05:43 +08:00
mlus-Asuka
93404dcdb5 change wrong file path 2023-06-20 15:55:04 +08:00
mlus-Asuka
8940c8be8d fix curios bugs. 2023-03-31 13:18:36 +08:00
mlus-Asuka
30b1690a73 fix chat and effects bugs. 2023-02-16 14:26:24 +08:00
mlus-Asuka
1283ede9d4 Release 1.0 2022-12-15 14:59:42 +08:00
mlus-Asuka
cb715beaf3 upload logo 2022-12-15 12:52:12 +08:00
mlus-Asuka
7b8d55f575 add sync condition 2022-12-12 11:25:49 +08:00
mlus-Asuka
4d3d8afe3d add curios support 2022-12-08 23:02:50 +08:00
mlus-Asuka
ef153d26c3 Initial commit 2022-12-08 16:59:20 +08:00