From c79168710b0b9c9872afcba6db5684aa517c71b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:12:38 +0300 Subject: [PATCH 01/12] Create cosmic_reach_model_editor.js --- .../cosmic_reach_model_editor.js | 287 ++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js new file mode 100644 index 00000000..21a4c6f5 --- /dev/null +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -0,0 +1,287 @@ + +function sumArrays(a, b){ + s = [] + for(let i = 0; i < Math.min(a.length, b.length); i++){ + s.push(a[i] + b[i]) + } + return s +} + +(() => { + let codec, format, export_action, import_action, dialog, properties + const id = "cosmic_reach_model_editor" + const name = "Cosmic Reach Model Editor" + const icon = "icon.png" + Plugin.register(id, { + title: name, + icon: "icon.png", + author: "Z. Hoeshin", + description: "A plugin that allows to create models for the game Cosmic Reach.", + tags: [], + version: "1.1.0", + creation_date: "2024-03-09", + onload() { + Codecs.java_block.load_filter.condition = (model) => { + return (model.parent || model.elements || model.textures) && (!model.cuboids); + } + + dialog = new Dialog("cosmic_reach_model_errormessage", { + id: "cosmic_reach_model_dialog", + title: "Something went wrong...", + buttons: [], + lines: [], + }) + + codec = new Codec("cosmic_reach_block_model_codec", { + name: "Cosmic Reach", + extension: "json", + remember: false, + load_filter: {type: "json", extensions: ["json"], + condition: (model) => { + console.warn(model) + return model.cuboids || model.textures; + } + }, + format: new ModelFormat("cosmic_reach_model", { + id: "cosmic_reach_model", + icon: null, + name: "Cosmic Reach Model", + description: "Model format used by the game Cosmic Reach", + show_on_start_screen: true, + target: ["json"], + + vertex_color_ambient_occlusion: true, + /*rotate_cubes: true, + rotation_limit: true, + rotation_snap: true,*/ + uv_rotation: true, + java_face_properties: true, + + edit_mode: true, + + new() { + newProject(this) + Project.texture_width = 16 + Project.texture_height = 16 + } + }), + compile(options={}){ + let facenamesbb = ["up", "down", "north", "south", "east", "west"] + let facenamescr = ["localPosY", "localNegY", "localNegZ", "localPosZ", "localPosX", "localNegX"] + + cuboids = [] + texturesUsed = [] + texturesFilesUsed = [] + textures = {} + + function compileCube(obj){ + let uvs = {} + for(let f of Object.keys(obj.faces)){ + let uv = obj.faces[f].uv + + let texture = Texture.all.filter((x) => {return x.uuid == obj.faces[f].texture})[0] + texture = (texture === undefined) ? "empty.png" : texture.name + + let face = obj.faces[f] + + uvs[f] = [uv[0], uv[1], uv[2], uv[3], face, texture] + + texturesUsed.push(texture) + } + + let cube = { + "localBounds": [...obj.from, ...obj.to], + "faces": + { + "localNegX": {"uv": uvs.west.slice(0, 4), "ambientocclusion": uvs.west[4].tint === 0, + "cullFace": uvs.west[4].cullFace !== "", "texture": uvs.west[5]}, + "localPosX": {"uv": uvs.east.slice(0, 4), "ambientocclusion": uvs.east[4].tint === 0, + "cullFace": uvs.east[4].cullFace !== "", "texture": uvs.east[5]}, + + "localNegY": {"uv": uvs.down.slice(0, 4), "ambientocclusion": uvs.down[4].tint === 0, + "cullFace": uvs.down[4].cullFace !== "", "texture": uvs.down[5]}, + "localPosY": {"uv": uvs.up.slice(0, 4), "ambientocclusion": uvs.up[4].tint === 0, + "cullFace": uvs.up[4].cullFace !== "", "texture": uvs.up[5]}, + + "localNegZ": {"uv": uvs.north.slice(0, 4), "ambientocclusion": uvs.north[4].tint === 0, + "cullFace": uvs.north[4].cullFace !== "", "texture": uvs.north[5]}, + "localPosZ": {"uv": uvs.south.slice(0, 4), "ambientocclusion": uvs.south[4].tint === 0, + "cullFace": uvs.south[4].cullFace !== "", "texture": uvs.south[5]} + } + } + + for(let f = 0; f < 6; f++){ + if(uvs[facenamesbb[f]][4].rotation > 0){ + cube.faces[facenamescr[f]].uvRotation = uvs[facenamesbb[f]][4].rotation + } + } + + cuboids.push(cube) + } + function compileGroup(group){ + group.children.forEach(obj => { + if (obj instanceof Group) { + compileGroup(obj); + } else if (obj instanceof Cube) { + compileCube(obj) + } + }) + } + + Outliner.root.forEach(obj => { + if (obj instanceof Group) { + compileGroup(obj); + } else if (obj instanceof Cube) { + compileCube(obj) + } + }) + + for(let i = 0; i < texturesUsed.length; i++){ + if(texturesUsed[i] == null){ + continue + } + const name = texturesUsed[i] + textures[name] = { "fileName": name } + } + + return JSON.stringify({"textures": textures, "cuboids": cuboids}) + }, + + parse(rawJSONstring, path){ + let loadedTextures = {} + + let patharr = path.split(/[\\\/]/g) + patharr = patharr.slice(0, patharr.length - 1) + + if(patharr.length > 1){ + patharr = [...patharr.slice(0, patharr.length - 2), "textures", patharr.pop()] + } + + let facenamesbb = ["up", "down", "north", "south", "east", "west"] + let facenamescr = ["localPosY", "localNegY", "localNegZ", "localPosZ", "localPosX", "localNegX"] + + let allTexturesSpecified = false + + let data = rawJSONstring instanceof String ? JSON.parse(rawJSONstring) : rawJSONstring + + if(data.textures == undefined){ + data.textures = {} + } + for(let t of Object.keys(data.textures)){ + let newtexture = new Texture().fromPath([...patharr, data.textures[t].fileName].join("/")) + loadedTextures[t] = newtexture.add() + } + + if(Texture.all.length > 0) { + setTimeout(() => { + Project.texture_width = Texture.all[0].width + Project.texture_height = Texture.all[0].height + }, 50); + } + + if(data.textures["all"] != undefined){ + allTexturesSpecified = true + } + + function getFaceUV(cuboid, face, uv){ + return cuboid.faces[face].uv[uv] + } + + function setUVforFace(cube, cuboid, facenamebb, facenamecr){ + texture = allTexturesSpecified ? data.textures["all"] : data.textures[cuboid.faces[facenamecr].texture] + cube.faces[facenamebb].uv =[getFaceUV(cuboid, facenamecr, 0), + getFaceUV(cuboid, facenamecr, 1), + getFaceUV(cuboid, facenamecr, 2), + getFaceUV(cuboid, facenamecr, 3)] + cube.faces[facenamebb].texture = Texture.all.filter((x) => {return x.name == texture.fileName})[0] + } + + if(data.cuboids == undefined){ + throw Error(`No cuboids found in file ${path}`) + } + + for(let cuboid of data.cuboids){ + let from = cuboid.localBounds.slice(0, 3) + let to = cuboid.localBounds.slice(3, 6) + + let cube = new Cube({from: from, to: to}) + for(let i = 0; i < 6; i++){ + try{ + setUVforFace(cube, cuboid, facenamesbb[i], facenamescr[i]) + cube.faces[facenamesbb[i]].texture = loadedTextures[cuboid.faces[facenamescr[i]].texture] + }catch(error){ + + } + cube.faces[facenamesbb[i]].cullface = cuboid.faces[facenamescr[i]].cullFace ? facenamesbb[i] : "" + cube.faces[facenamesbb[i]].tint = cuboid.faces[facenamescr[i]].ambientocclusion ? 0 : -1 + } + + cube.addTo(Group.all.last()).init() + } + + setTimeout(() => { + Canvas.updateAll() + }, 50); + + return true; + } + }) + + + import_action = new Action('import_cosmic_reach_model', { + name: 'Import Cosmic Reach Model', + description: '', + icon: null, + category: 'file', + click() { + Blockbench.import({ + extensions: ['json'], + type: 'Cosmic Reach Model', + readtype: 'text', + resource_id: 'json' + }, files => { + try{ + codec.parse(files[0].content, files[0].path); + Canvas.updateAll() + }catch(error){ + dialog.lines = `
+

Unable to import file.

+

${error}

+
`.split("\n") + dialog.show() + } + }) + } + }) + + export_action = new Action('export_cosmic_reach_model', { + name: 'Export Cosmic Reach Model', + description: '', + icon: null, + category: 'file', + click() { + try{ + codec.export(); + }catch(error){ + dialog.lines = `
+

Unable to export file.

+

${error}

+
`.split("\n") + dialog.show() + } + } + }) + + MenuBar.addAction(import_action, 'file.import') + MenuBar.addAction(export_action, 'file.export') + + + + }, + onunload() { + import_action.delete(); + export_action.delete(); + + } + }) + })() From 0f265e34def17744bc3378d9dec83f328e253d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:16:46 +0300 Subject: [PATCH 02/12] Add files via upload --- plugins/cosmic_reach_model_editor/about.md | 4 ++++ plugins/cosmic_reach_model_editor/icon.png | Bin 0 -> 386 bytes 2 files changed, 4 insertions(+) create mode 100644 plugins/cosmic_reach_model_editor/about.md create mode 100644 plugins/cosmic_reach_model_editor/icon.png diff --git a/plugins/cosmic_reach_model_editor/about.md b/plugins/cosmic_reach_model_editor/about.md new file mode 100644 index 00000000..ec987e10 --- /dev/null +++ b/plugins/cosmic_reach_model_editor/about.md @@ -0,0 +1,4 @@ +# Cosmic Reach Model Editor +Simple plugin that allows editing models that were created for the game [Cosmic Reach](https://finalforeach.itch.io/cosmic-reach). +
+If any bugs founds, make sure to report it to the plugin's [Github](https://github.com/zHoeshin/CosmicReachModelEditor). \ No newline at end of file diff --git a/plugins/cosmic_reach_model_editor/icon.png b/plugins/cosmic_reach_model_editor/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..356ccdda0c7fd454b885a9b6fbfa2162172c0034 GIT binary patch literal 386 zcmV-|0e$|7P)Px$JV``BR9J=WSD_BVFc7^F6aj%kqX|JGNM_i#pfP*}hL7Mgz|2iA)6*yf1Utm? zlJ&8pWm(b+o>{MHuf2Eg);3zLca@09coIt!(@`RQ;{LiA_Vba7h{&MVRXQNrBO;BhBk|P#xhgputrWT@elguBz5F z!8zA}d8meP7yxXl|5X#H4lu-iy)*FNz=sA{#o8Z^fqvEoY<$^YI1FeJFtj>%tqNu^ z90oLKId`3BVhn;IVXEkf;=ka_?_Rj#nh&bn34qeCbSpWocEB?QXBJFjI g_d;LL{Cj8M4aDJh8%mE8(EtDd07*qoM6N<$g6UtU@c;k- literal 0 HcmV?d00001 From 72df803e1b1817c223c12a87756137cb87635211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:21:14 +0300 Subject: [PATCH 03/12] Update plugins.json --- plugins.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins.json b/plugins.json index 6b043ac9..d4c664a6 100644 --- a/plugins.json +++ b/plugins.json @@ -889,5 +889,17 @@ "min_version": "4.8.0", "variant": "both", "creation_date": "2024-04-1" + }, + "cosmic_reach_model_editor": { + "title": "Cosmic Reach Model Editor", + "author": "Z. Hoeshin", + "icon": "icon.png", + "description": "Allows creating, editing, importing and exporting Cosmic Reach block models.", + "tags": ["Cosmic Reach"], + "version": "1.1.0", + "min_version": "4.9.4", + "variant": "both", + "creation_date": "2024-03-09", + "new_repository_format": true, } } From ff1aa4c8ad60441ee8580ec86420af107ec7c9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:21:47 +0300 Subject: [PATCH 04/12] Update cosmic_reach_model_editor.js --- plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js index 21a4c6f5..1773acfc 100644 --- a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -16,7 +16,7 @@ function sumArrays(a, b){ title: name, icon: "icon.png", author: "Z. Hoeshin", - description: "A plugin that allows to create models for the game Cosmic Reach.", + description: "Allows creating, editing, importing and exporting Cosmic Reach block models.", tags: [], version: "1.1.0", creation_date: "2024-03-09", From 48d51a6b43266e96bdd4ef6f4e1c828f9177a754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Thu, 11 Apr 2024 07:41:36 +0300 Subject: [PATCH 05/12] Update cosmic_reach_model_editor.js --- .../cosmic_reach_model_editor.js | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js index 1773acfc..c48a8929 100644 --- a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -1,14 +1,5 @@ - -function sumArrays(a, b){ - s = [] - for(let i = 0; i < Math.min(a.length, b.length); i++){ - s.push(a[i] + b[i]) - } - return s -} - (() => { - let codec, format, export_action, import_action, dialog, properties + let codec, format, export_action, import_action, dialog, properties, originalJavaBlockCond const id = "cosmic_reach_model_editor" const name = "Cosmic Reach Model Editor" const icon = "icon.png" @@ -17,10 +8,14 @@ function sumArrays(a, b){ icon: "icon.png", author: "Z. Hoeshin", description: "Allows creating, editing, importing and exporting Cosmic Reach block models.", - tags: [], - version: "1.1.0", + tags: ["Cosmic Reach"], + version: "1.1.1", + min_version: "4.8.0", creation_date: "2024-03-09", + variant: "both", + new_repository_format: true, onload() { + originalJavaBlockCond = Codec.java_block.load_filter.condition Codecs.java_block.load_filter.condition = (model) => { return (model.parent || model.elements || model.textures) && (!model.cuboids); } @@ -38,7 +33,6 @@ function sumArrays(a, b){ remember: false, load_filter: {type: "json", extensions: ["json"], condition: (model) => { - console.warn(model) return model.cuboids || model.textures; } }, @@ -281,7 +275,7 @@ function sumArrays(a, b){ onunload() { import_action.delete(); export_action.delete(); - + Codec.java_block.load_filter.condition = originalJavaBlockCond } }) })() From 4fa555dff9c5509f6b07f06a87bca3ccaae583fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Thu, 11 Apr 2024 07:42:47 +0300 Subject: [PATCH 06/12] Update plugins.json --- plugins.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins.json b/plugins.json index d4c664a6..722b4a5c 100644 --- a/plugins.json +++ b/plugins.json @@ -896,8 +896,8 @@ "icon": "icon.png", "description": "Allows creating, editing, importing and exporting Cosmic Reach block models.", "tags": ["Cosmic Reach"], - "version": "1.1.0", - "min_version": "4.9.4", + "version": "1.1.1", + "min_version": "4.8.0", "variant": "both", "creation_date": "2024-03-09", "new_repository_format": true, From d6a193d8d7745b5cdfec36c6c6056835162d98f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:26:27 +0300 Subject: [PATCH 07/12] Update cosmic_reach_model_editor.js --- plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js index c48a8929..3fd60889 100644 --- a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -17,7 +17,7 @@ onload() { originalJavaBlockCond = Codec.java_block.load_filter.condition Codecs.java_block.load_filter.condition = (model) => { - return (model.parent || model.elements || model.textures) && (!model.cuboids); + return !model.cuboids && originalJavaBlockCond(model); } dialog = new Dialog("cosmic_reach_model_errormessage", { From 81d9ede8f48daadec6ccd9c4713dca38083278cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:29:05 +0300 Subject: [PATCH 08/12] Update plugins.json --- plugins.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins.json b/plugins.json index 722b4a5c..efe8d493 100644 --- a/plugins.json +++ b/plugins.json @@ -900,6 +900,6 @@ "min_version": "4.8.0", "variant": "both", "creation_date": "2024-03-09", - "new_repository_format": true, + "new_repository_format": true } } From 0441771bf935ea99992732e4400dd0c9ea694f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:30:09 +0300 Subject: [PATCH 09/12] Update cosmic_reach_model_editor.js --- .../cosmic_reach_model_editor/cosmic_reach_model_editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js index 3fd60889..928fcaf7 100644 --- a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -15,7 +15,7 @@ variant: "both", new_repository_format: true, onload() { - originalJavaBlockCond = Codec.java_block.load_filter.condition + originalJavaBlockCond = Codecs.java_block.load_filter.condition Codecs.java_block.load_filter.condition = (model) => { return !model.cuboids && originalJavaBlockCond(model); } @@ -275,7 +275,7 @@ onunload() { import_action.delete(); export_action.delete(); - Codec.java_block.load_filter.condition = originalJavaBlockCond + Codecs.java_block.load_filter.condition = originalJavaBlockCond } }) })() From 2336fdc17a0ccbecf5c9b2ab6ae71bedcf11c4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:35:20 +0300 Subject: [PATCH 10/12] Update cosmic_reach_model_editor.js --- .../cosmic_reach_model_editor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js index 928fcaf7..c7116993 100644 --- a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -11,7 +11,7 @@ tags: ["Cosmic Reach"], version: "1.1.1", min_version: "4.8.0", - creation_date: "2024-03-09", + creation_date: "2024-04-19", variant: "both", new_repository_format: true, onload() { @@ -38,7 +38,7 @@ }, format: new ModelFormat("cosmic_reach_model", { id: "cosmic_reach_model", - icon: null, + icon: "icon.png", name: "Cosmic Reach Model", description: "Model format used by the game Cosmic Reach", show_on_start_screen: true, @@ -225,7 +225,7 @@ import_action = new Action('import_cosmic_reach_model', { name: 'Import Cosmic Reach Model', description: '', - icon: null, + icon: "icon.png", category: 'file', click() { Blockbench.import({ @@ -251,7 +251,7 @@ export_action = new Action('export_cosmic_reach_model', { name: 'Export Cosmic Reach Model', description: '', - icon: null, + icon: "icon.png", category: 'file', click() { try{ From d1f5f81e56c2e6f439b13d9466919002009b8ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:35:44 +0300 Subject: [PATCH 11/12] Update plugins.json --- plugins.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins.json b/plugins.json index efe8d493..cbead420 100644 --- a/plugins.json +++ b/plugins.json @@ -899,7 +899,7 @@ "version": "1.1.1", "min_version": "4.8.0", "variant": "both", - "creation_date": "2024-03-09", + "creation_date": "2024-04-19", "new_repository_format": true } } From dad1c29e6c561ea7acce2487b8e233fde6717857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeron=20H=C3=B6shin?= <96698378+zHoeshin@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:36:18 +0300 Subject: [PATCH 12/12] Update cosmic_reach_model_editor.js --- .../cosmic_reach_model_editor/cosmic_reach_model_editor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js index c7116993..596c2cf6 100644 --- a/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js +++ b/plugins/cosmic_reach_model_editor/cosmic_reach_model_editor.js @@ -3,6 +3,7 @@ const id = "cosmic_reach_model_editor" const name = "Cosmic Reach Model Editor" const icon = "icon.png" + const icon64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAATxJREFUWIXtV6EOwjAQvREUAYFCowlBIkhm2LegMXwFho/gM8DMTS/T0ygEBDvE8pL1saNlWdIKnlmvaa+9d+/WNlqtd5WIyHgSSxPTUSJ94v66GPbzkYqIyKDXVTog2iTnqtnBkS/mM8OOl98dprlpF+XNsJkJ7wwM0UDkiBiRrrftE48n0z7s28dn19ofmCnKeh0w4Z8BqBEM2CIHbFoA2E9RirGefwbQQO55x8i1LeLsatrIOWsjzet1UB3hMKDBVRNdEQ4DrqrWNME514B5qIZwGABsqv9VE6gOMMR+vTPw38CHBljF2h+OgX7WBmx82V84DGgRMLQ6d60KZjAcBjRoOXedZ2MmHAZwPuMOh51rOWc1a+rn8XxL9s8Av4g451oOXcfxWQAEcyv+v4wi7XWM90Jf0Px7Z+ANxOF3G0qPE9EAAAAASUVORK5CYII=" Plugin.register(id, { title: name, icon: "icon.png", @@ -38,7 +39,7 @@ }, format: new ModelFormat("cosmic_reach_model", { id: "cosmic_reach_model", - icon: "icon.png", + icon: icon64, name: "Cosmic Reach Model", description: "Model format used by the game Cosmic Reach", show_on_start_screen: true, @@ -225,7 +226,7 @@ import_action = new Action('import_cosmic_reach_model', { name: 'Import Cosmic Reach Model', description: '', - icon: "icon.png", + icon: icon64, category: 'file', click() { Blockbench.import({ @@ -251,7 +252,7 @@ export_action = new Action('export_cosmic_reach_model', { name: 'Export Cosmic Reach Model', description: '', - icon: "icon.png", + icon: icon64, category: 'file', click() { try{