From 0b8ad22fe33283406c3580bf6e72f73daccdf6b9 Mon Sep 17 00:00:00 2001 From: JoshieGemFinder <79513611+JoshieGemFinder@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:22:49 +1000 Subject: [PATCH 1/4] double_sided_cubes: Add support for optional box UV projects, fix naming, and adjust outliner placement --- plugins/double_sided_cubes.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/double_sided_cubes.js b/plugins/double_sided_cubes.js index 069eb1a64..3420802c2 100644 --- a/plugins/double_sided_cubes.js +++ b/plugins/double_sided_cubes.js @@ -12,11 +12,11 @@ variant: 'both', onload() { cube_action = new Action({ - id:"create_double_sided_cubes", + id: "create_double_sided_cubes", name: 'Create Double Sided Cube', icon: 'flip_to_back', category: 'edit', - condition: () => !Project.box_uv, + condition: () => !Project.box_uv || Project.optional_box_uv, click: function(ev) { if (selected.length === 0) { Blockbench.showMessage('No cubes selected', 'center') @@ -26,10 +26,15 @@ let cubes = []; Cube.selected.forEach((cube) => { const new_cube = cube.duplicate(); - new_cube.name = new_cube.name + " inverted"; - if (cube.parent !== "root") { - new_cube.addTo(cube.parent); - }; + // Set the new cube to Per-Face UV if it was using Box UV + if (!!new_cube.box_uv) { + new_cube.setUVMode(false); + } + // cube.duplicate() will sometimes change the name of the duplicated cube, + // so we base this on cube.name instead of new_cube.name. + new_cube.name = cube.name + " inverted"; + // Place new_cube immediately after cube in the outliner + new_cube.sortInBefore(cube, 1); for (i=0; i<3; i++){ new_cube.flip(i, 0, false) }; From b650010b8b281ace453fa03e7ee4f11801a08f4d Mon Sep 17 00:00:00 2001 From: JoshieGemFinder <79513611+JoshieGemFinder@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:25:58 +1000 Subject: [PATCH 2/4] double_sided_cubes: Increment version --- plugins.json | 2 +- plugins/double_sided_cubes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins.json b/plugins.json index 0d1212de6..597592922 100644 --- a/plugins.json +++ b/plugins.json @@ -97,7 +97,7 @@ "icon": "flip_to_back", "description": "Creates inverted duplicates of the selected cube(s) to allow double-sided rendering in Minecraft: Java Edition.", "tags": ["Minecraft: Java Edition"], - "version": "1.0.1", + "version": "1.0.2", "variant": "both" }, "optimize": { diff --git a/plugins/double_sided_cubes.js b/plugins/double_sided_cubes.js index 3420802c2..cef919505 100644 --- a/plugins/double_sided_cubes.js +++ b/plugins/double_sided_cubes.js @@ -8,7 +8,7 @@ description: 'Creates inverted duplicates of the selected cube(s) to allow double-sided rendering in java edition.', tags: ["Minecraft: Java Edition"], icon: 'flip_to_back', - version: '1.0.1', + version: '1.0.2', variant: 'both', onload() { cube_action = new Action({ From bef9921065ff3b2dc1a846f004e831032271745b Mon Sep 17 00:00:00 2001 From: JoshieGemFinder <79513611+JoshieGemFinder@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:34:59 +1000 Subject: [PATCH 3/4] double_sided_cubes: Fix invalid legacy metadata --- plugins.json | 2 +- plugins/double_sided_cubes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins.json b/plugins.json index 597592922..8dbca0b23 100644 --- a/plugins.json +++ b/plugins.json @@ -92,7 +92,7 @@ "variant": "both" }, "double_sided_cubes": { - "title": "Double Sided Cube Generator", + "title": "Double Sided Cubes", "author": "SnaveSutit", "icon": "flip_to_back", "description": "Creates inverted duplicates of the selected cube(s) to allow double-sided rendering in Minecraft: Java Edition.", diff --git a/plugins/double_sided_cubes.js b/plugins/double_sided_cubes.js index cef919505..19d91aa84 100644 --- a/plugins/double_sided_cubes.js +++ b/plugins/double_sided_cubes.js @@ -5,7 +5,7 @@ Plugin.register('double_sided_cubes', { title: 'Double Sided Cubes', author: 'SnaveSutit', - description: 'Creates inverted duplicates of the selected cube(s) to allow double-sided rendering in java edition.', + description: 'Creates inverted duplicates of the selected cube(s) to allow double-sided rendering in Minecraft: Java Edition.', tags: ["Minecraft: Java Edition"], icon: 'flip_to_back', version: '1.0.2', From bbce7794b589781b3a2da058e41219150afc3fb0 Mon Sep 17 00:00:00 2001 From: JoshieGemFinder <79513611+JoshieGemFinder@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:30:33 +1000 Subject: [PATCH 4/4] doubled_sided_cubes: Update cube name after flipping cube --- plugins/double_sided_cubes.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/double_sided_cubes.js b/plugins/double_sided_cubes.js index 19d91aa84..c3d3a9c66 100644 --- a/plugins/double_sided_cubes.js +++ b/plugins/double_sided_cubes.js @@ -30,14 +30,15 @@ if (!!new_cube.box_uv) { new_cube.setUVMode(false); } - // cube.duplicate() will sometimes change the name of the duplicated cube, - // so we base this on cube.name instead of new_cube.name. - new_cube.name = cube.name + " inverted"; - // Place new_cube immediately after cube in the outliner - new_cube.sortInBefore(cube, 1); + // Invert new_cube for (i=0; i<3; i++){ new_cube.flip(i, 0, false) }; + // cube.duplicate() and new_cube.flip(...) will sometimes change new_cube.name, + // so we make sure to set the name here, and base it on cube.name instead + new_cube.name = cube.name + " inverted"; + // Place new_cube immediately after cube in the outliner + new_cube.sortInBefore(cube, 1); new_cube.from = [...cube.to]; new_cube.to = [...cube.from]; new_cube.inflate = -new_cube.inflate;