Repository navigation
Fix blueprint copy sizes, sunken boats, and the blueprint schema - #3118
Merged
Merged
Conversation
pos1/pos2 can be fractional (set from where the player stands), so the box width plus one can still be one short. Count blocks the same way getVectors does: floor(max) - floor(min) + 1. Found on a test server where a copy spanning 30 layers recorded ySize 29. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entities were stored by block with no height within the block, and pasted at the bottom of that block, so a boat floating on water pasted sunk into it (and a mob on a slab pasted inside the slab). configureEntity tried to apply the stored offset with e.getLocation().add(...), which only changes a copy and never did anything. Now ordinary entities store their height within the block when copied and spawn at it via BlueprintEntity#getSpawnLocation. Horizontal position stays the block centre, as before. Display and hanging entities already place themselves and are unchanged. Entities in existing blueprints have a height of 0 and paste exactly where they did before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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 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
Two blueprint fixes found while testing #3117 on a 26.3 server. They were pushed to the #3117 branch after it had been merged, so they never reached
develop.Copy sizes were one short
xSize/ySize/zSizewere set from the bounding box width. pos1/pos2 can be fractional (they come from where the player stands), so the width, and even width + 1, can undercount the blocks actually copied. A copy spanning 30 layers recordedySize29. Sizes are now counted the waygetVectorscopies:floor(max) - floor(min) + 1. The sizes are only used for the "no bedrock" centre fallback; the particle outline doesn't use them.Entities pasted at the bottom of their block
Entities were stored by block with no height within that block, so a boat floating on water pasted sunk into the water block (a mob on a slab would paste inside the slab).
configureEntitytried to apply an offset withe.getLocation().add(...), which only changes a copy and never did anything; that line is removed.BlueprintEntity#getSpawnLocation(Location)(@since 3.23.8).JSON Schema (
schemas/blueprint.schema.json)fill,fillMin,fillMaxfrom Store blueprint air (or water) as a fill block instead of per block #3117. TheBlueprintobject hasadditionalProperties: false, so every compact blueprint failed validation.{}for empty Vector-keyed maps. Gson writes an empty map as{}, not[], so any blueprint with no attached blocks or no entities failed. 23 of 35 real blueprints (game mode repos + test server) failed the old schema; all 35 pass now, and non-empty objects, unknown keys and malformed vectors are still rejected.yand inclusive sizes.Testing
🤖 Generated with Claude Code