Repository navigation
Paste and copy blueprints within a per-tick time budget - #3119
Merged
Merged
Conversation
Pasting and copying ran exactly one batch of paste-speed (64) blocks per tick, about 1,280 blocks a second no matter how idle the server was. The AcidIsland starter island (6,562 blocks) took about 5 s for the Overworld alone, and the player waits for every world before teleport. - New setting island.paste-time-budget (ms per tick, default 10). Pasting and copying run batches of paste-speed until the budget is used, the work is done, or (pasting) a batch is waiting for a chunk to load. 0 keeps the old one-batch-per-tick behavior. - Copy: find entities once with getNearbyEntities over the copy box, instead of scanning every entity in the world each tick; step through the block list by index instead of stream().skip(index), which made copy time grow with the square of its size; look up the ItemsAdder hook once. Progress messages now report the highest 10% mark passed each tick (batches can jump past exact multiples). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a time budget, pasting is limited by the server's spare time and usually finishes almost at once, so the one-batch-per-tick estimate overstated it by seconds. The block count message is still shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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
Pasting and copying blueprints ran exactly one batch of
paste-speed(64) blocks per tick: about 1,280 blocks a second, however idle the server is. The AcidIsland starter island is 6,562 blocks, about 5 s for the Overworld alone, and the player isn't teleported until the Overworld, Nether and End have all pasted one after another.Time budget
island.paste-time-budget(milliseconds per tick, default 10,since 3.23.8). Each tick, pasting runs batches ofpaste-speeduntil the budget is used up, the paste is finished, or a batch is waiting for a chunk to load (currentTasknot done). Copying runs batches until the budget is used or the copy is done.0keeps the old behaviour: one batch per tick.BlueprintPasterandBlueprintClipboard;PasteHandlerandDefaultPasteUtilare unchanged, so BentoBoxFAWEHandler is unaffected.Copy fixes
world.getNearbyEntitiesover the copy box at the start, instead of scanning every entity in the world on every tick.stream().skip(index)walked past every block already copied, every tick, so copy time grew with the square of the copy size.Notes
paste-time-budgetis 0. With a budget, the paste time depends on the server's spare time and usually finishes almost at once, so the old estimate overstated it. The block count message is still sent.copy airfinished quickly.Tests
🤖 Generated with Claude Code