Port Watson to 1.21.11 + bug fixes + performance#1
Closed
Conversation
- Add volatile to static fields in CoreProtectAnalysis (_looping, isCpMessage) - Wrap Analysis.m handler map with synchronizedListMultimap - Synchronize iteration over handler entries in dispatchMatchedChat - Fix handler duplication bug in removeMatchedChatHandler when key unchanged - Add NPE guard in WatsonRenderer when getBlockEditSet() returns null - Add NPE guard in OverlayRenderer for deposit labels and annotations - Add instanceof check in MixinChatHud before casting Text to MutableText - Make ReplayThread field volatile with null-safe cancelReplay - Wrap ReplayThread MC API calls in mc.execute() for thread safety - Cache compiled regex patterns in Analysis for better performance
- Batch all outline draw calls into single buffer per player (was 1 draw call per block, now 1 per player) - Replace O(N²) isOreNotDrawn scan with packed-coordinate HashSet lookup - Add view-distance-based culling to skip off-screen blocks - Cache Identifier.tryParse result per BlockEdit to avoid repeated lookups - Extract addVertex() helper in RenderUtils to eliminate ~100 duplicated vertex/color/normal/lineWidth call chains - Remove dead no-op methods (renderModelQuadOutlines, renderQuadOutlinesBatched) - Use full block outline fallback for drawBlockModelOutlinesBatched on 1.21.11
- SyncTaskQueue: add MAX_TASKS_PER_TICK (200) limit to prevent tick freeze when bulk-loading edits - BlockEditSet: always log render errors (was DEBUG-only, hiding real issues) - EditSelection: always log draw errors in selection renderer
- IntCoord.hashCode: include _world field for consistency with equals() - EditSelection: clear static _edits map on disconnect to prevent memory leak - WorldLoadListener: call EditSelection.clearAllEdits() when worldAfter is null - CoreProtectAnalysis: compile formatting regex once (FORMATTING_PATTERN) instead of per-call String.replaceAll
- Add AUXPROTECT enum value to Plugins config - Create AuxProtectAnalysis stub (patterns TBD from test server) - Register AuxProtect handler in ChatProcessor - Add translation keys for en_us and ru_ru
- Replace reflection with access widener for RenderPipelines fields (fixes NoSuchFieldException due to intermediary mapping mismatch) - Fix ClientCommandSource ClassCastException in all command handlers by using raw CommandDispatcher and removing ServerCommandSource deps - Fix outline rendering: remove hasContent gate that prevented buffer submission (drawOutline always returned 0) - Change default block color from cyan to gray for better visibility - Expand SMALLER_RENDER_BOX defaults with common terrain blocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
./gradlew buildcompiles without errors/co iresults render 3D outlines through walls/watson helpand other commands