From 8f7aaa746f7daefa6cb1b24a678b2ca9d6c8c5bd Mon Sep 17 00:00:00 2001 From: Marcos Alonso Amor <158332624+MarcosAlonso05@users.noreply.github.com> Date: Sat, 14 Feb 2026 01:02:50 +0100 Subject: [PATCH 1/3] Add files via upload --- plugins/hytale_hitbox_helper/README.md | 20 +++ .../hytale_hitbox_helper.js | 136 ++++++++++++++++++ plugins/hytale_hitbox_helper/icon.png | Bin 0 -> 3117 bytes 3 files changed, 156 insertions(+) create mode 100644 plugins/hytale_hitbox_helper/README.md create mode 100644 plugins/hytale_hitbox_helper/hytale_hitbox_helper.js create mode 100644 plugins/hytale_hitbox_helper/icon.png diff --git a/plugins/hytale_hitbox_helper/README.md b/plugins/hytale_hitbox_helper/README.md new file mode 100644 index 00000000..01133679 --- /dev/null +++ b/plugins/hytale_hitbox_helper/README.md @@ -0,0 +1,20 @@ +# Hytale Hitbox Helper + +**Hytale Hitbox Helper** is a dedicated plugin for Blockbench designed to streamline the creation and export of collision hitboxes for Hytale. + +## Features + +* **Dedicated Format:** Adds a new "Hytale Hitbox" project type. +* **Optimized Workspace:** * Automatic **Wireframe** view mode on activation. +* **Quick Add:** One-click button to add a standard 32x32x32 hitbox. +* **Smart Export:** * Exports strictly to Hytale's `.json` format. + * Only exports elements named "hitbox" (case insensitive). + * Automatic coordinate conversion (32 BB units = 1.0 Hytale unit). + +## How to Use + +1. Go to **File > New** and select **Hytale Hitbox**. +2. Use the **Add Hitbox** button in the "Add Element" menu (sidebar). +3. Resize and position your hitboxes as needed. + * *Note: Ensure the elements are named "hitbox" in the outliner.* +4. Go to **File > Export > Export Hytale Hitbox (.json)** diff --git a/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js b/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js new file mode 100644 index 00000000..5a56c567 --- /dev/null +++ b/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js @@ -0,0 +1,136 @@ +(function() { + let export_action; + let add_hitbox_action; + + const HITBOX_FORMAT_ID = 'hytale_hitbox'; + + BBPlugin.register('hytale_hitbox_helper', { + title: 'Hytale Hitbox Helper', + author: 'Marck.A.A', + icon: 'icon-format_hytale', + description: 'Tool to create easy Hytale hitboxes exportable to JSON.', + version: '1.0.0', + variant: 'both', + onload() { + const format = new ModelFormat(HITBOX_FORMAT_ID, { + name: 'Hytale Hitbox', + description: 'A simple format for creating Hytale hitboxes, exportable to JSON.', + icon: 'icon-format_hytale', + category: 'hytale', + target: 'Hytale', + block_size: 32, + centered_grid: true, + box_uv: false, + optional_box_uv: false, + single_texture: false, + rotate_cubes: false, + + onActivation() { + document.body.classList.add('hytale_hitbox_mode'); + const viewMode = BarItems['view_mode']; + if (viewMode) { + viewMode.value = 'wireframe'; + viewMode.onChange(); + } + Blockbench.showQuickMessage("Hytale Hitbox Mode Active"); + }, + onDeactivation() { + BarItems['view_mode'].value = 'textured'; + BarItems['view_mode'].onChange(); + document.body.classList.remove('hytale_hitbox_mode'); + } + }); + + Blockbench.addCSS(` + body.hytale_hitbox_mode #panel_textures, + body.hytale_hitbox_mode #panel_uv { + display: none !important; + } + `); + + + add_hitbox_action = new Action('add_hytale_hitbox', { + name: 'Add Hitbox', + icon: 'fa-cube', + category: 'edit', + condition: () => Format.id === HITBOX_FORMAT_ID, + click: function() { + const mesh = new Cube({ + name: 'hitbox', + color: 2, + from: [-16, 0, -16], + to: [16, 32, 16], + }).init(); + + mesh.mesh.material.transparent = true; + mesh.mesh.material.opacity = 0.5; + + Undo.initEdit({elements: [mesh], outliner: true}); + Undo.finishEdit('Add Hytale Hitbox'); + } + }); + + BarItems.add_element.side_menu.addAction(add_hitbox_action); + + export_action = new Action('export_hytale_hitbox', { + name: 'Export Hytale Hitbox (.json)', + icon: 'fa-file-export', + category: 'file', + condition: () => Format.id === HITBOX_FORMAT_ID, + click: function() { + exportHytaleHitbox(); + } + }); + + MenuBar.menus.file.addAction(export_action, 'export'); + }, + onunload() { + export_action.delete(); + add_hitbox_action.delete(); + } + }); + + function exportHytaleHitbox() { + const hitboxes = Cube.all.filter(cube => + cube.name.toLowerCase() === 'hitbox' && cube.export + ); + + if (hitboxes.length === 0) { + Blockbench.showMessageBox({ + title: 'No Hitboxes found', + message: 'No elements called "hitbox" were found to export.' + }); + return; + } + + let json_output = { + "Boxes": [] + }; + + hitboxes.forEach(cube => { + json_output.Boxes.push({ + "Min": { + "X": (cube.from[0] + 16) / 32, + "Y": cube.from[1] / 32, + "Z": (cube.from[2] + 16) / 32 + }, + "Max": { + "X": (cube.to[0] + 16) / 32, + "Y": cube.to[1] / 32, + "Z": (cube.to[2] + 16) / 32 + } + }); + }); + + const content = JSON.stringify(json_output, null, 2); + + Blockbench.export({ + type: 'JSON Model', + extensions: ['json'], + name: Project.name || 'hitbox', + content: content, + resource_id: 'hytale_hitbox' + }); + } + +})(); \ No newline at end of file diff --git a/plugins/hytale_hitbox_helper/icon.png b/plugins/hytale_hitbox_helper/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8533fb328b214ae0f2c9481ec2b473bffff304a2 GIT binary patch literal 3117 zcmV+|4AS$7P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf6951U69E94oEQKA3&Kf6K~!i%&6#_Q zT-RO4KfiPCz4O{x?|awl$NC*?r%s%vX+wllAg@*>6w^QWr>KF3v_T*h5EKxlYEuzN z{wa#6ghFXTg9J&Fwo#zSZJI(7l9D(tJB=O3-i=?o9`DY~&hyT__x$){W~0s2_Ig*v z;UisX=A3)a`F`*Do!33W^4SUub|=0^9Fy*pCAbOr1K_W^GcGX}_#E*4g3fd%p3S|mOT+;$-YH+SOwfrW&j4IB2f8sV4xbfzzH$!3Kt z4pBvtIF1c?0Aeg4gmH{2U<|&sq)rHiwGEFG!C1R$@e&8P2IWVHC6sAs#ouw zK60dR9`P(?;HSg`1pPzzrPAp;lh}!+L0%O-nkJA{7Lh$z&v*N+HIu|K(Sy zsGzNgotq|DzkVI{T8(C_Mc9gHwIW(kq>Xw_5`=1_sm>arW?jSi;`^#|bB8+O9|2xp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-W38a4?=L##FXoTC{x4>I=WwwzeYd$#2(9?dFHkKAz`%m|2UjY-O0lJa*SD(WN0+hg zIj{Hyx1MG3ANcamNc>{F z3$*rP78|%I@rw)fJ7MzxaAZ;X&w{wK4ZT<uwdZ-Qv7n606ue}nD1sU z@Q=V{oinrd^18PZHW$4&md-@>>p=S($9qc*eC=Z2Jiz|~1E5tEWmwIN00000NkvXX Hu0mjfKb-`p literal 0 HcmV?d00001 From 996cd46fa52b2f47605654f250eb985c75fb405e Mon Sep 17 00:00:00 2001 From: Marcos Alonso Amor <158332624+MarcosAlonso05@users.noreply.github.com> Date: Sat, 14 Feb 2026 01:13:54 +0100 Subject: [PATCH 2/3] Add Hytale Hitbox Helper plugin details --- plugins.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins.json b/plugins.json index 10d413ff..27ce3652 100644 --- a/plugins.json +++ b/plugins.json @@ -1393,5 +1393,15 @@ "website": "https://pastelito.dev", "has_changelog": true, "repository": "https://github.com/PasteDev/blockbench-plugins/tree/master/plugins/hytale_avatar_loader" + }, + "hytale_hitbox_helper": { + "title": "Hytale Hitbox Helper", + "author": "Marck.A.A", + "version": "1.0.0", + "description": "Dedicated tool to create Hytale hitboxes and JSON export.", + "icon": "icon.png", + "variant": "both", + "tags": ["Hytale"] } + } From 97b81dc44275e9c59a571ee5b60daac7f49ada08 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Sat, 21 Feb 2026 13:57:09 +0100 Subject: [PATCH 3/3] Hytale hitbox helper --- plugins.json | 16 ++++---- .../{README.md => about.md} | 38 +++++++++---------- .../hytale_hitbox_helper.js | 3 +- 3 files changed, 28 insertions(+), 29 deletions(-) rename plugins/hytale_hitbox_helper/{README.md => about.md} (95%) diff --git a/plugins.json b/plugins.json index a184cc5b..3d47923a 100644 --- a/plugins.json +++ b/plugins.json @@ -1396,13 +1396,14 @@ }, "hytale_hitbox_helper": { "title": "Hytale Hitbox Helper", - "author": "Marck.A.A", - "version": "1.0.0", - "description": "Dedicated tool to create Hytale hitboxes and JSON export.", - "icon": "icon.png", - "variant": "both", - "tags": ["Hytale"] - }, + "author": "Marck.A.A", + "version": "1.0.0", + "description": "Dedicated tool to create Hytale hitboxes and JSON export.", + "icon": "icon.png", + "variant": "both", + "min_version": "4.8.0", + "tags": ["Hytale"] + }, "baked_ambient_occlusion": { "title": "Mr Salmon's Baked Ambient Occlusion", "author": "Kai Salmon", @@ -1418,5 +1419,4 @@ "Shading" ] } - } diff --git a/plugins/hytale_hitbox_helper/README.md b/plugins/hytale_hitbox_helper/about.md similarity index 95% rename from plugins/hytale_hitbox_helper/README.md rename to plugins/hytale_hitbox_helper/about.md index 01133679..9082fdcc 100644 --- a/plugins/hytale_hitbox_helper/README.md +++ b/plugins/hytale_hitbox_helper/about.md @@ -1,20 +1,18 @@ -# Hytale Hitbox Helper - -**Hytale Hitbox Helper** is a dedicated plugin for Blockbench designed to streamline the creation and export of collision hitboxes for Hytale. - -## Features - -* **Dedicated Format:** Adds a new "Hytale Hitbox" project type. -* **Optimized Workspace:** * Automatic **Wireframe** view mode on activation. -* **Quick Add:** One-click button to add a standard 32x32x32 hitbox. -* **Smart Export:** * Exports strictly to Hytale's `.json` format. - * Only exports elements named "hitbox" (case insensitive). - * Automatic coordinate conversion (32 BB units = 1.0 Hytale unit). - -## How to Use - -1. Go to **File > New** and select **Hytale Hitbox**. -2. Use the **Add Hitbox** button in the "Add Element" menu (sidebar). -3. Resize and position your hitboxes as needed. - * *Note: Ensure the elements are named "hitbox" in the outliner.* -4. Go to **File > Export > Export Hytale Hitbox (.json)** +**Hytale Hitbox Helper** is a dedicated plugin for Blockbench designed to streamline the creation and export of collision hitboxes for Hytale. + +## Features + +* **Dedicated Format:** Adds a new "Hytale Hitbox" project type. +* **Optimized Workspace:** * Automatic **Wireframe** view mode on activation. +* **Quick Add:** One-click button to add a standard 32x32x32 hitbox. +* **Smart Export:** * Exports strictly to Hytale's `.json` format. + * Only exports elements named "hitbox" (case insensitive). + * Automatic coordinate conversion (32 BB units = 1.0 Hytale unit). + +## How to Use + +1. Go to **File > New** and select **Hytale Hitbox**. +2. Use the **Add Hitbox** button in the "Add Element" menu (sidebar). +3. Resize and position your hitboxes as needed. + * *Note: Ensure the elements are named "hitbox" in the outliner.* +4. Go to **File > Export > Export Hytale Hitbox (.json)** diff --git a/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js b/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js index 5a56c567..7aac66e9 100644 --- a/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js +++ b/plugins/hytale_hitbox_helper/hytale_hitbox_helper.js @@ -7,8 +7,9 @@ BBPlugin.register('hytale_hitbox_helper', { title: 'Hytale Hitbox Helper', author: 'Marck.A.A', - icon: 'icon-format_hytale', + icon: 'icon.png', description: 'Tool to create easy Hytale hitboxes exportable to JSON.', + min_version: '4.8.0', version: '1.0.0', variant: 'both', onload() {