Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
60939ac
Add SB Worn Display Editor plugin
hrmcngs May 30, 2026
db76fcb
sb_worn_display: v4.2.2 — fix viewport break on tab switch
hrmcngs Jun 1, 2026
b99874b
sb_worn_display: v4.2.3 — restore Reference Model on tab switch
hrmcngs Jun 1, 2026
f24014c
sb_worn_display: v4.3.0 — import display values from another model
hrmcngs Jun 2, 2026
f6f480a
sb_worn_display: v4.4.0 — Center Model / Center View + outliner ctx menu
hrmcngs Jun 2, 2026
497dc2a
sb_worn_display: v4.5.0 — fix Undo, add Center Pivot, native Center View
hrmcngs Jun 2, 2026
ac4c11c
sb_worn_display: v4.6.0 — true bulk-replace import + slider refresh fix
hrmcngs Jun 2, 2026
7255241
sb_worn_display: v4.6.1 — import button in Custom Slot section header
hrmcngs Jun 2, 2026
62c31c9
sb_worn_display: v4.7.0 — true per-axis partial replace
hrmcngs Jun 2, 2026
61e0a1f
sb_worn_display: v4.8.0 — bulk import now covers vanilla slots
hrmcngs Jun 2, 2026
242e786
sb_worn_display: v4.9.0 — per-slot anchorY for preview position
hrmcngs Jun 3, 2026
60c6f33
sb_worn_display: v4.9.1 — rotate preview 180° on Z to match in-game
hrmcngs Jun 3, 2026
4e02b83
sb_worn_display: v4.9.2 — verify release.sh end-to-end after fixing e…
hrmcngs Jun 3, 2026
5d3e136
sb_worn_display: v4.10.0 — sync SB Worn and MAW Back via syncGroup (s…
hrmcngs Jun 4, 2026
052f22c
sb_worn_display: v4.11.0 — add backpack_arsenal:chestplate target
hrmcngs Jun 4, 2026
290d0cb
sb_worn_display: v4.12.0 — per-target X/Y/Z preview rotation, anchor …
hrmcngs Jun 4, 2026
0ffcd9e
sb_worn_display: v4.12.1 — match BA chestplate preview to in-game
hrmcngs Jun 5, 2026
5702ad0
sb_worn_display: v4.12.2 — match MAW saya back/belt preview to in-gam…
hrmcngs Jun 8, 2026
022483a
sb_worn_display: v4.13.0 — add backpack_arsenal:placed + referenceMode
hrmcngs Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -1534,5 +1534,19 @@
"website": "https://svdex.moe",
"min_version": "4.8.0",
"has_changelog": true
},
"sb_worn_display": {
"title": "SB Worn Display Editor",
"author": "hrmcngs",
"icon": "backpack",
"description": "Adds a Custom Slot row to the Display panel so you can edit custom item display keys (Sophisticated Backpacks worn, MAW saya back/belt, Backpack-Arsenal chestplate / placed) visually in the 3D viewport, using the same sliders as the vanilla slots.",
"tags": ["Minecraft: Java Edition", "Modeling"],
"version": "4.13.0",
"min_version": "4.8.0",
"variant": "both",
"website": "https://github.com/hrmcngs/sb-worn-display-blockbench",
"repository": "https://github.com/hrmcngs/sb-worn-display-blockbench",
"bug_tracker": "https://github.com/hrmcngs/sb-worn-display-blockbench/issues",
"creation_date": "2026-05-31"
}
}
21 changes: 21 additions & 0 deletions plugins/sb_worn_display/LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Hiromichi Nagase

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions plugins/sb_worn_display/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SB Worn Display Editor

Adds a **Custom Slot** row to Blockbench's Display panel so you can edit custom item display keys defined by Forge mods — visually, in the 3D viewport, with the same sliders you use for the vanilla `head` / `gui` / `ground` slots.

Built specifically for these keys, but trivially extensible to any custom key:

| Key | Used by |
|---|---|
| `sophisticatedbackpacks:worn` | Sophisticated Backpacks — backpack worn on Curios "back" slot |
| `the_four_primitives_and_weapons:back` | MAW saya worn on Curios "back" slot |
| `the_four_primitives_and_weapons:belt` | MAW saya worn on Curios "belt" slot |

## Why

Blockbench ships with the 8 vanilla Java display contexts (`thirdperson_*`, `firstperson_*`, `head`, `gui`, `ground`, `fixed`). Custom display contexts defined by Forge mods via `ItemDisplayContext.create(...)` are preserved in the model JSON, but the default UI gives you no way to edit them visually — and worse, **values for unknown keys are silently dropped on save** because the exporter iterates `DisplayMode.slots`.

This plugin:

1. **Registers the custom keys** in `DisplayMode.slots` so values round-trip safely through save / reload.
2. **Adds a "Custom Slot" row** under Reference Model using Blockbench's own native UI markup (`panel_toolbar_label` + `bar tabs_small icon_bar` + `label.tool`) — visually identical in style to the vanilla Slot row.
3. Provides a fallback **numeric Edit dialog** under the Tools menu for typing exact values.

## Usage

1. Open a Java Item Model JSON
2. Switch to **Display** mode
3. In the right panel, find the new **Custom Slot** row under Reference Model
4. Click any of the three icons (backpack / ruler / belt)
5. Adjust rotation, translation, and scale with the standard sliders
6. Ctrl+S to save

The plugin uses `head`'s camera angle and player reference model as a visual proxy. **Scale and rotation translate accurately** to in-game appearance. **Translation values** are pixel-relative offsets from the anchor point set by the mod's renderer (back / belt), which is not the head — so iterate by testing in-game for translation tuning.

## Adding more keys

Source the plugin from its [GitHub repo](https://github.com/hrmcngs/sb-worn-display-blockbench) and edit the `TARGETS` array at the top of `sb_worn_display.js`.

## How it works

The Display panel's Slot row in Blockbench's `DisplayModePanel.vue` is hardcoded (no `v-for` loop), so there is no official extension API. This plugin works around that by injecting a new section into the panel DOM and using a MutationObserver to keep it present after Vue re-renders. Click handlers reuse `DisplayMode.loadHead()` to set up the camera and reference model, then override `DisplayMode.slot` to the custom key.

This approach is inherently fragile — a future Blockbench update that restructures `DisplayModePanel.vue` will break the injected row. The Tools menu Edit dialogs remain as a stable fallback.

## Source

- Repository: <https://github.com/hrmcngs/sb-worn-display-blockbench>
- Issues: <https://github.com/hrmcngs/sb-worn-display-blockbench/issues>
- License: MIT
2 changes: 2 additions & 0 deletions plugins/sb_worn_display/members.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
maintainers:
- hrmcngs
Loading
Loading