Repository navigation
Store blueprint air (or water) as a fill block instead of per block - #3117
Merged
Merged
Conversation
A blueprint copied with air stores every block in its box, nearly all of them plain air. Now, when a blueprint's blocks define every position of their box, the most common plain block (air, or water for ocean builds) is stored once as the blueprint's fill, with the box corners, and removed from the block map. Pasting places the fill at every box position that has no explicit block, so the result is identical. - Compaction only happens when the box is fully defined, so blueprints copied without air (where a gap means "leave the world alone"), or with air + nowater, are unchanged. - Blocks with any state (inventory, sign text, spawner, banner, ItemsAdder) are never the fill; a fill keeps the most common biome and blocks in other biomes stay explicit. - Existing blueprints paste exactly as before. Full-box ones are compacted in memory on load and saved compact on the next save. - Pasting skips fill blocks the world already has (e.g. air in a void world) when the chunk is loaded, bounded per tick. - Copy sizes now include both corner blocks (were one short per axis). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
tastybento
added a commit
that referenced
this pull request
Nov 16, 2026
- Add `fill`, `fillMin` and `fillMax` (new in 3.23.8, #3117). The Blueprint object has additionalProperties: false, so every compact blueprint failed validation. - Gson writes an empty Vector-keyed map as `{}`, not `[]`. The schema only accepted arrays, so any blueprint with no attached blocks or no entities failed. 23 of the 35 blueprints in the game mode repos and on a test server failed the old schema; all 35 pass now. Non-empty objects are still rejected. - Document entity `y` (height in the block, used since 3.23.8) and that sizes count both corner blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
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
Copying a blueprint with
airstores every air block individually, so a 50×50×50 copy holds ~125kBlueprintBlocks, nearly allminecraft:air. Every loaded blueprint keeps those in memory for the life of the server.Now, when a blueprint's blocks define every position of their box, the most common plain block is stored once as the blueprint's
fill(withfillMin/fillMaxbox corners) and removed fromblocks. On paste, every box position without an explicit block gets the fill. The pasted result is identical.airleaves gaps that mean "leave the world alone", so it can't use a fill. The same goes forair nowater. Those are stored exactly as before; the coverage check handles this, no special-casing.blocksis covered by the fill (or stays explicit if the fill is water).xSize/ySize/zSizewere one short per axis (box width rather than block count). Only used for the "no bedrock" centre fallback; particles are unaffected.configureEntitytried to apply an offset withe.getLocation().add(...), which is a no-op on a copy. Ordinary entities now record their in-block height and spawn at it viaBlueprintEntity#getSpawnLocation(@since 3.23.8). Old blueprints have height 0 and paste as before; display and hanging entities are unchanged.Compatibility
fillfield means no fill./bbox save, icon change).Blueprint#getFill/setFill/getFillMin/setFillMin/getFillMax/setFillMaxandBlueprintFill#compact, all@since 3.23.8.getBlocks()Javadoc now notes it doesn't list fill positions.Tests
BlueprintFillTest: compaction picks air or water, the expanded paste equals the original, gaps/already-compact/no-repeats aren't compacted, stateful blocks are never fill, per-biome handling.BlueprintPasterTest: fill + blocks are both pasted; fill already in place is skipped; unloaded chunks are pasted without a block lookup.BlueprintClipboardManagerTest: an old full-air blueprint compacts on load and round-trips through save/load; a gappy blueprint is untouched.BlueprintClipboardTest: anaircopy ends compacted with inclusive sizes.Full suite: 3651 tests, 0 failures. Tested on a 26.3 server with AcidIsland: an
aircopy over the acid sea compacted with water as the fill.🤖 Generated with Claude Code