Release 2.28.0#441
Open
tastybento wants to merge 16 commits into
Open
Conversation
The zero-island scan force-generated every chunk in the protection range with gen=true. On islands with a large range (e.g. 1000 → ~16k chunks per dimension on a fresh world) this blew past the 5-minute calculation timeout, leaving initialCount unset. Switch the zero scan to gen=false so it only counts chunks that exist at zero time (typically just the schematic), and add NewChunkListener to accumulate generator block points (sea floor, nether ceiling, etc.) into initialCount lazily as chunks are generated during normal play. Regular level calcs subtract the now-incrementally-grown initialCount, so generator blocks always cancel out and players only get credit for their own placements. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…block config values Instead of reading the stale accumulated donatedPoints value stored in the database (which was calculated at donation-time using then-current block values), dynamically recalculate the donated points from the donatedBlocks map using the current block config values on every level calculation. This fixes incorrect level calculations when block config values change after blocks have been donated. Previously the stored total could be less than a single block type's current contribution, as seen in the issue where Iron Block x 3,553 = 49,742 points but the total donated points reported was only 49,348. Also update the getReport() donated block section to use getValue(world, key) for world-specific block value lookups, consistent with how the calculation works. Fixes #nnn Agent-Logs-Url: https://github.com/BentoBoxWorld/Level/sessions/8d20bea9-7362-4af9-aa27-e0ae175eec2a Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BentoBoxWorld/Level/sessions/e64dd47d-1dfc-4c51-967f-0646c6d8af1b Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…lation-issue Fix donated points calculation using stale stored total instead of current block values
- S2184: keep the chunk-centre Location arithmetic in double space by using +8.0 so SonarQube does not flag a theoretical int-overflow before implicit widening. - S107: replace the 12-parameter scan helper with a ScanContext record bundling all main-thread snapshot state. - S3776 / S135: split the nested scan into scanRow / scanColumn / valueAt helpers so each method is small, has at most one return / continue, and total cognitive complexity drops below 15. No behaviour change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ection-range fix: zero new island on large protection ranges via incremental capture
…nfig-limits Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…mits [WIP] Fix blockconfig limits for donations
…mpts PR #439 added limits to /is donate hand and inv execution, but the GUI panel still accepted any amount and both the hand and inv confirm prompts quoted pre-limit numbers. Apply limits in DonationPanel preview and confirm (returning excess to the player), and rebuild the hand/inv prompts to quote the actual amount that will be destroyed. Add a multi-line limit-notice shown when any material is capped, translated into all 16 locales. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A 1000-protection-range AcidIsland scan took 160s because loadChunks fetched 15,876 chunk positions sequentially via getChunkAtAsync, and each callback round-trip cost ~10ms even when the chunk was ungenerated and returned null. This change: - Always skip generation during scans (gen=false). Lazy zeroing via NewChunkListener already keeps the handicap aligned with chunks as they generate, so forcing the generator for every position in a large protection range is unnecessary and times out. - Fast-path ungenerated positions with World.isChunkGenerated, a synchronous region-file lookup that avoids the async-scheduler hop. - Issue up to 32 async chunk fetches in parallel per batch instead of recursing one-at-a-time. - Drop the raw Location.toString() from scan log lines in favour of "<world_name> x,y,z". - Distinguish the zero-scan completion log from regular scans. The /<gamemode> levelstatus command now reports, per island, the scan type (zero vs regular), world + xyz, elapsed time, and a monotonically increasing chunks-scanned/total counter. The level report adds a matching "Chunks scanned = N/total" line under the initial-count line. Locale keys added: admin.levelstatus.island-detail / island-queued / type-zero / type-regular, translated into all 16 supported locales. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A 1000-protection-range new island reported level -44551 after a 1000-block flight. The handicap was 4,455,925 but the regular scan only found 784 points of value across the same chunks — a 5,683x over-counting. Two compounding causes: - Paper can fire ChunkLoadEvent with isNewChunk=true more than once for a given chunk under heavy chunk activity (ticket churn, parallel level-scan loads, plugin-triggered reloads). Each duplicate event credited the chunk to initialCount again. - The listener summed raw getValue per block while the regular scan applies per-material limits via limitCountAndValue. Limited high-value blocks could inflate the handicap past anything the scan would ever credit. Fix: - Track counted chunks per island in an in-memory Set<Long> keyed by packed (x,z). Skip if the chunk has already contributed during this server run. After a restart Paper reports isNewChunk=false for already- generated chunks, so prior-run chunks are not at risk on re-load. - Apply per-material limits in valueAt, capping each material at its configured limit within each chunk. This bounds the handicap to what the regular scan would credit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The zero-island scan set initialCount via setInitialIslandCount(totalPoints), which wiped any listener credits captured during the scan. Chunks that generated mid-scan and were skipped by the chunk-poll (ungenerated at poll time) then appeared in the next level scan with no matching handicap, producing a stable positive level on a fresh island. Track per-island scan-visited chunks and listener-deferred credits so the post-scan drain folds in only the chunks the scan missed. Also stop the console spam from logging every pending zero-scan, only count actually-scanned chunks in the report's X/Y figure, and raise the default zero-scan-delay-ticks from 40 (2s) to 600 (30s) so underwater obsidian formation finishes before the listener snapshots. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…l-chunk-scan perf+fix: parallel chunk fetches, lazy zero scan, fresh-island level=0
|
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.



No description provided.