Skip to content

fix: handle platform locales and frozen block targeting - #99

Merged
twme-ai merged 1 commit into
TWME-TW:mainfrom
twme-ai:fix/platform-locale-freeze-targeting
Aug 19, 2026
Merged

fix: handle platform locales and frozen block targeting#99
twme-ai merged 1 commit into
TWME-TW:mainfrom
twme-ai:fix/platform-locale-freeze-targeting

Conversation

@twme-ai

@twme-ai twme-ai commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • prefer Paper's Player.locale() through a runtime compatibility layer while retaining Spigot's Player.getLocale() fallback
  • consume the locale carried by PlayerLocaleChangeEvent and normalize language tags consistently
  • resolve the frozen block in front of the server-reported click target before considering the block behind it
  • explicitly resync the restored block state so an originally-native barrier remains visible after unfreezing
  • extend the Mineflayer test to cover zh_TW, repeated right-click unfreezing, behind-block regressions, and native barrier restoration

A single Java 17 artifact remains compatible with Spigot, Paper, and Folia; the Paper-only locale method is isolated behind reflection, so separate platform builds are unnecessary.

Verification

  • mvn -B test: 11 tests, 0 failures, 0 errors
  • Spigot 1.19.4 Mineflayer E2E: passed
  • Spigot 1.21.11 Mineflayer E2E: passed
  • Paper 1.20.6 Mineflayer E2E: passed
  • Folia 1.20.6 Mineflayer E2E: passed without region-thread violations
  • Spigot, Paper, and Folia 26.2 startup/plugin-enable E2E: passed

The Mineflayer assertions verify the Traditional Chinese response, display entity lifecycle, absence of a second frozen block behind the target, and stone/barrier client-side restoration.

@twme-ai
twme-ai merged commit 0e6a0c8 into TWME-TW:main Aug 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant