Repository navigation
fix: paint and texture tools - #74
Merged
jasonjgardner merged 7 commits intoOct 1, 2026
Merged
Conversation
The tool called rectangle-selection methods that no longer exist and left an undo edit open, so the next paint failed. Selections are now read and written per pixel through IntMatrix, inputs are checked before the edit opens, and feather_selection is refused with an explanation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apply_texture called updateChangesAfterEdit(), which re-encodes the bitmap, converts a file texture to an internal one and flags it unsaved, so a Ctrl+S rewrote the PNG although only face assignments changed. The call is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
applyTo none mapped to Texture.apply(false), which textures the faces selected in the UV editor and all six faces of box-UV cubes. none now changes nothing and only checks the element and texture, and the option's description says what each mode does. Behaviour change: applyTo none is now a no-op that records no history entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er or any face In face and element modes, a seed that hit no face made Blockbench fill the whole texture, and color fills seeded outside the texture, or outside a smaller or offset active layer, read a transparent seed and recolored every transparent pixel. Seeded fills now need a pixel inside the texture; color and color_connected fills also need it on the active layer they sample (after the paint target is resolved), and face and element fills need a face found the way Painter.useFilltool finds it (UVEditor.findFaceAtUV). The texture and face checks run before the texture is activated or any stroke starts. Behaviour change: these seeds are now errors instead of fills of the whole texture or layer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d short hex colors paint_with_brush stamped pixels itself, so blend mode, pixel-perfect drawing, lock alpha, mirror painting and the user's current brush were ignored, and it painted #F00 as #F00000. It now paints one native brush_tool stroke like the other paint tools and writes only the given settings to the brush. Behaviour changes: - Brush settings the call omits keep the current brush; before, they reset it to a 1 px opaque black square. - connect_strokes false stamps the points as separate dabs of one stroke (one undo entry) on Blockbench 5.2 and later. Older hosts, which are not trusted to stamp a move without a line, paint one stroke per point, one undo entry each. - Colors are accepted as before (any string, an alpha part ignored). Hex colors are normalized to #rrggbb, so #RGB and #RGBA expand per digit, and color names, which were parsed as hex digits, now paint in the named color. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
create_texture rejected fill_color without layer_name, yet never used the name: it creates textures without layers. layer_name is now optional and documented as deprecated and ignored; texture_layer_management create_layer adds a named layer. Calls that pass it are still accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
color_picker_tool claimed readOnlyHint although it changes the active colors, selects the texture and, with pick_opacity or depending on Blockbench's settings, sets the brush opacity or switches the active paint tool. It is now annotated as non-destructive and idempotent, and its description says what it changes, so clients that run read-only tools without asking now ask first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: jasonjgardner/blockbench-mcp-plugin/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 1, 2026
Merged
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.
Fixes for the paint and texture tools, found while auditing 1.9.3 with Blockbench 5.2.1 on Windows. One commit per issue:
texture_selection: it called rectangle-selection methods that no longer exist in Blockbench 5.2, and left an Undo edit open, so the next paint call failed. This is also wheretscreports 16 errors on main. Selections are now read and written per pixel throughIntMatrix, inputs are checked before the edit opens, andfeather_selectionis refused with an explanation.apply_texturemarked the texture modified: it calledupdateChangesAfterEdit(), which re-encodes the bitmap, turns a file texture into an internal one and flags it unsaved. A Ctrl+S then rewrote the PNG although only face assignments changed. The call is removed.apply_texturewithapplyTo: "none": it mapped toTexture.apply(false), which textures the faces selected in the UV editor and all six faces of box-UV cubes.nonenow changes nothing, and the option's description says what each mode does.paint_fill_toolseeds:Painter.useFilltoolfinds it (UVEditor.findFaceAtUV). All checks run before anything is activated.paint_with_brush:brush_toolstroke like the other paint tools, and writes only the given settings to the brush.#F00paints#FF0000instead of#F00000. Other colour strings are accepted as before.create_texture: it requiredlayer_namewithfill_colorbut never used it. It is now optional and documented as deprecated.color_picker_tool: it was annotated read-only, although it changes the active colours and can switch the tool. It is now annotated as a non-destructive state change.Behaviour changes to be aware of:
apply_texturenoneis a no-op.paint_fill_toolrejects seeds outside the texture or the active layer, and face/element seeds that hit no face.paint_with_brush, omitted settings keep the current brush.color_picker_tool.Not included: with Blockbench's colour-picker tool switch on, picking a transparent pixel sets no colour, and
color_picker_toolthen reports the previous colour.Testing:
bun test: 1,208 pass, 0 fail (main: 1,184).bunx tsc --noEmit: only the 3 errors main already has inlib/factories.ts; the 16 inselection-tools.tsare gone.bun run buildandbun run docs:buildpass.texture_selection.applyTo: "none"on a box-UV cube.#F00painting#FF0000.test:actions:live(61 checks) andtest:pbr:live(75 checks) pass against the same build. Theaction-wrappersandmcp-identitysmoke scripts are updated for the new behaviour.Related PRs from the same audit: #70 (HTTP server, settings and file inputs), #71 (views and captures), #72 (modeling tools), #73 (animation, GeckoLib and display), #75 (headless server), #69 (loopback bind). All of them merge together without conflicts (checked).
🤖 Generated with Claude Code