├── LICENSE.md ├── ModelEngineBanner.png ├── ModelEngineBannerSmall.png ├── README.md ├── blockbench plugins ├── double_sided_cubes.js ├── mcmeta.js ├── meg.js └── meg_utils.js ├── demo ├── Model-Engine-Demo-R2.5.3.jar ├── Model-Engine-Demo-R3.0.2.jar └── legacy │ ├── 1.0 │ └── Model-Engine-Demo-r1.0.9.jar │ ├── Model-Engine-Demo-B3.0.0-0d5d6e6.jar │ ├── Model-Engine-Demo-B3.0.0-Build-040decb.jar │ ├── Model-Engine-Demo-R2.4.1.jar │ ├── Model-Engine-Demo-R2.4.2.jar │ ├── Model-Engine-Demo-R2.5.0.jar │ ├── Model-Engine-Demo-R2.5.1.jar │ ├── Model-Engine-Demo-R2.5.2.jar │ ├── Model-Engine-Demo-R3.0.0.jar │ ├── Model-Engine-Demo-R3.0.1.jar │ ├── Model-Engine-Demo-b2.0.0.jar │ ├── Model-Engine-Demo-b2.0.1.jar │ ├── Model-Engine-Demo-b2.0.2.jar │ ├── Model-Engine-Demo-b2.0.3.jar │ ├── Model-Engine-Demo-b2.0.4.jar │ ├── Model-Engine-Demo-r2.1.0.jar │ ├── Model-Engine-Demo-r2.1.1.jar │ ├── Model-Engine-Demo-r2.1.2.jar │ ├── Model-Engine-Demo-r2.1.3.jar │ ├── Model-Engine-Demo-r2.1.4.jar │ ├── Model-Engine-Demo-r2.1.5.jar │ ├── Model-Engine-Demo-r2.1.6.jar │ ├── Model-Engine-Demo-r2.1.7.jar │ ├── Model-Engine-Demo-r2.1.8.jar │ ├── Model-Engine-Demo-r2.2.0.jar │ ├── Model-Engine-Demo-r2.3.0.jar │ ├── Model-Engine-Demo-r2.3.1.jar │ ├── Model-Engine-Demo-r2.3.2.jar │ └── Model-Engine-Demo-r2.4.0.jar ├── version patch └── ME-1.18-Compatibility-Patch.jar └── wiki ├── KindletronJR.yml ├── KindletronSkills.yml ├── MythicMobs ├── MM_All.png ├── MM_Mechanics.png └── MM_Targeter.png ├── Scarecrow.yml ├── animation ├── attack.gif ├── export_animation.png ├── exported_location.png ├── idle.gif ├── kindletronjr_in_game.gif ├── loop_and_override.png ├── state_and_priority.png └── walk.gif ├── blockbench ├── bb_input.png ├── file_structure.png ├── input_animation.png ├── input_model.png ├── input_texture.png ├── model_engine_converter.js └── output.png └── modeling ├── ME-Model-1.png ├── ME-Model-2.png ├── ME-Model-3.png ├── ME-Model-4.png ├── ME-Model-5.png ├── bone_and_cube.png ├── create_project.png ├── create_project_2.png ├── deselect_box_uv.png ├── exporting.png └── kindletronjr_in_game.gif /LICENSE.md: -------------------------------------------------------------------------------- 1 | LICENSE 2 | 3 | Version 1.4, October 2021 4 | Copyright (C) 2021 Ticxo 5 | 6 | 1. Definition 7 | * "Server" shall mean server hosting Minecraft's multiplayer gamemode. 8 | * "Plugin" (or "Plugins") shall mean an external compiled jar file which modifies Minecraft's Server-side behavior with aids of modified Server such as, and not restricted to, Bukkit, Spigot and Paper. 9 | * "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 10 | * "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 11 | * "Resource" shall mean all new files created using Model Engine which requires Your file input. 12 | * “Distribute” (or "Distributed") shall mean sending fully or partially decompiled or compiled elements of Model Engine to other people or entities who do not already own a license of Model Engine. 13 | 2. You are allowed to create extensions and modifications of this plugin. This includes, but is not limited to: 14 | * Using Model Engine as dependency to develop Plugins 15 | * Modifying source code of Model Engine to enhance functionality 16 | 3. If You create extensions or modifications of this Plugin, they may not be published or Distributed without express permission from the Licensor. 17 | 4. Licensor does not retain any rights or responsibilities for the Resources You generate using Model Engine. 18 | 5. If using this plugin in the production of NFTs, or in association with a service that utilizes NFTs which profits 19 | off of the use of our software, you must publicly disclose the use of this plugin and display reasonable credit to 20 | ConxeptWorks in written form with a link to our website, unless you obtain an NFT License or written waiver. You 21 | may contact Ticxo to obtain such a license or waiver. 22 | 6. You acknowledge we reserve the right to blacklist any account without notice from using our software and/or 23 | accessing our servers for violating this license, and that such a ban may prohibit you from utilizing our software or 24 | receiving any related support, and that such a ban does not constitute grounds for a refund of any money spent or 25 | a breach of this agreement in any way for any ConxeptWorks software you purchased. 26 | 7. The following is a list of all registered licensing entities at the onset of this license: 27 | * www.spigotmc.org/resources/79477/ 28 | * www.mc-market.org/resources/15743/ 29 | * www.mythiccraft.io/index.php?resources/389/ 30 | * Ticxo (conxeptworks@gmail.com) 31 | -------------------------------------------------------------------------------- /ModelEngineBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/ModelEngineBanner.png -------------------------------------------------------------------------------- /ModelEngineBannerSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/ModelEngineBannerSmall.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This wiki is archived. Visit the new wiki [here](https://git.lumine.io/mythiccraft/modelengine/-/wikis/home). 2 | ![Alt](/ModelEngineBanner.png ) 3 | Credits: [ForrestBono(content creator)](https://www.youtube.com/c/Forrestbono), [Painful(content creator)](https://www.youtube.com/c/Painful) 4 | # Model Engine 5 | Model Engine is a Minecraft plugin that breaks the barrier of entity modeling and allows you to create mod-like models, animate them, and give complete control to its animation. You may have heard of a plugin named ModelAPI, a modeling plugin that requires you to have basic knowledge of java and coding plugins. Model Engine, however, completely removed the need for coding anything. In other words, you are free to create anything, without knowing java! 6 | 7 | ## Supported Version 8 | Currently, Model Engine supports Minecraft 1.14 to 1.19. If you want 1.13 or below, check out [ModelAPI](https://www.spigotmc.org/resources/modelapi-custom-entity-model-manager.68014/). 9 | 10 | ## Installation 11 | 1. Download Model Engine 12 | 2. Place the plugin jar file into the `plugins` folder of your server 13 | 3. Happy modeling 14 | 15 | ## Wiki 16 | Click [here](https://github.com/Ticxo/Model-Engine-Wiki/wiki) to start your modeling journey. 17 | 18 | ## API 19 | [![Latest Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmvn.lumine.io%2Frepository%2Fmaven-public%2Fcom%2Fticxo%2Fmodelengine%2Fapi%2Fmaven-metadata.xml)](https://mvn.lumine.io/service/rest/repository/browse/maven-public/com/ticxo/modelengine/api/) 20 | 21 | ```xml 22 | 23 | nexus 24 | Lumine Public 25 | https://mvn.lumine.io/repository/maven-public/ 26 | 27 | 28 | 29 | com.ticxo.modelengine 30 | api 31 | Check above 32 | provided 33 | 34 | ``` 35 | 36 | ## Demo 37 | You can download the demo files for the model and MythicMobs here. 38 | KindletronJR [[Model]](https://drive.google.com/file/d/1gMiE6mii_9AiRRj9QFq480xvrRPW9Gdg/view?usp=sharing) [[Mob YML]](https://github.com/Ticxo/Model-Engine-Wiki/blob/master/wiki/KindletronJR.yml) [[Skill YML]](https://github.com/Ticxo/Model-Engine-Wiki/blob/master/wiki/KindletronSkills.yml) 39 | Scarecrow ([Naoxia](https://www.youtube.com/channel/UCc5itTcpJZV_5Sj2VvfS1DA)) [[Model]](https://drive.google.com/file/d/122-TiGNuDWCMov4NjVD-44sEtVAsC8rM/view?usp=sharing) [[Mob YML]](https://github.com/Ticxo/Model-Engine-Wiki/blob/master/wiki/Scarecrow.yml) 40 | Kindletron Senior ([LittleRoomDev](https://www.youtube.com/channel/UCGgqcLqJSpXVqanJyE_6L3A)) [[Download]](https://www.patreon.com/posts/kindletron-free-49222891) 41 | 42 | ## Bug Reports, Feature Requests, Plugin Support, Community, and Marketplace 43 | Join our [Discord](https://discord.gg/K3tqXfT). It's free, and you can socialize with other users! 44 | -------------------------------------------------------------------------------- /blockbench plugins/double_sided_cubes.js: -------------------------------------------------------------------------------- 1 | (()=> { 2 | 3 | let cube_action; 4 | 5 | Plugin.register('double_sided_cubes', { 6 | title: 'Double Sided Cubes', 7 | author: 'SnaveSutit', 8 | description: 'Creates inverted duplicates of the selected cube(s) to allow double-sided rendering in java edition.', 9 | tags: ["Minecraft: Java Edition"], 10 | icon: 'flip_to_back', 11 | version: '1.0.0', 12 | variant: 'both', 13 | onload() { 14 | cube_action = new Action({ 15 | id:"create_double_sided_cubes", 16 | name: 'Create Double Sided Cube', 17 | icon: 'flip_to_back', 18 | category: 'edit', 19 | condition: () => !Project.box_uv, 20 | click: function(ev) { 21 | if (selected.length === 0) { 22 | Blockbench.showMessage('No cubes selected', 'center') 23 | return; 24 | }; 25 | Undo.initEdit({elements:[]}); 26 | let cubes = []; 27 | Cube.selected.forEach((cube) => { 28 | const new_cube = new Cube({...cube}).init(); 29 | new_cube.name = new_cube.name + " inverted"; 30 | if (cube.parent !== "root") { 31 | new_cube.addTo(cube.parent); 32 | }; 33 | for (i=0; i<3; i++){ 34 | new_cube.flip(i, 0, false) 35 | }; 36 | new_cube.origin[0] = -new_cube.origin[0]; 37 | new_cube.origin[1] = -new_cube.origin[1]; 38 | new_cube.origin[2] = -new_cube.origin[2]; 39 | 40 | new_cube.from = [...cube.to]; 41 | new_cube.to = [...cube.from]; 42 | new_cube.inflate = -new_cube.inflate; 43 | Canvas.adaptObjectPosition(new_cube); 44 | Canvas.updateUV(new_cube); 45 | cubes.push(new_cube); 46 | }); 47 | Undo.finishEdit('create_double_sided_cube', {elements:cubes}); 48 | } 49 | }); 50 | MenuBar.addAction(cube_action, 'filter'); 51 | }, 52 | onunload() { 53 | cube_action.delete(); 54 | } 55 | }); 56 | })(); -------------------------------------------------------------------------------- /blockbench plugins/mcmeta.js: -------------------------------------------------------------------------------- 1 | var mcmetas = {}; 2 | 3 | var compileCallback = (e) => { 4 | e.model.mcmetas = mcmetas; 5 | }; 6 | 7 | var parseCallback = (e) => { 8 | Object.assign(mcmetas, e.model.mcmetas); 9 | }; 10 | 11 | (function() { 12 | let editButton; 13 | let importButton; 14 | 15 | Plugin.register('mcmeta', { 16 | title: 'Save MCMeta', 17 | author: 'Ticxo', 18 | description: 'Save MCMeta files to bbmodel because Jannis won\'t do it.', 19 | icon: 'save', 20 | version: '0.0.1', 21 | variant: 'both', 22 | onload() { 23 | 24 | Codecs.project.on('compile', compileCallback); 25 | Codecs.project.on('parse', parseCallback); 26 | 27 | editButton = new Action('edit_mcmeta', { 28 | name: 'Edit MCMeta', 29 | description: 'Edit a MCMeta file.', 30 | icon: 'edit', 31 | click() { 32 | setBoneTypeMenu().show(); 33 | } 34 | }); 35 | 36 | importButton = new Action('import_mcmeta', { 37 | name: 'Import MCMeta', 38 | description: 'Import a MCMeta file.', 39 | icon: 'file_download', 40 | click() { 41 | Blockbench.import({ 42 | extensions: ['mcmeta'] 43 | }, function(files) { 44 | files.forEach(file => { 45 | mcmetas[Texture.selected.uuid] = JSON.parse(file.content); 46 | }) 47 | }); 48 | } 49 | }); 50 | 51 | Texture.prototype.menu.addAction('_'); 52 | Texture.prototype.menu.addAction(editButton); 53 | Texture.prototype.menu.addAction(importButton); 54 | }, 55 | onunload() { 56 | 57 | Codecs.project.events.compile.remove(compileCallback); 58 | Codecs.project.events.parse.remove(parseCallback); 59 | 60 | Texture.prototype.menu.structure.remove(editButton); 61 | Texture.prototype.menu.structure.remove(importButton); 62 | 63 | editButton.delete(); 64 | } 65 | }); 66 | 67 | })(); 68 | 69 | function setBoneTypeMenu(){ 70 | 71 | let op = mcmetas[Texture.selected.uuid]; 72 | function getExtra() { 73 | return op ? JSON.stringify(op, null, 4) : ''; 74 | } 75 | 76 | let mcmetaDialog = new Dialog({ 77 | id: 'mcmeta_dialog', 78 | title: 'MCMeta', 79 | form: { 80 | mcmeta: { 81 | label: 'MCMeta', 82 | type: 'textarea', 83 | placeholder: 'mcmeta json...', 84 | value: getExtra() 85 | } 86 | }, 87 | onConfirm: function(formData) { 88 | mcmetas[Texture.selected.uuid] = JSON.parse(formData.mcmeta); 89 | this.hide(); 90 | }, 91 | onCancel: function(formData) { 92 | this.hide(); 93 | } 94 | }); 95 | 96 | return mcmetaDialog; 97 | } -------------------------------------------------------------------------------- /blockbench plugins/meg.js: -------------------------------------------------------------------------------- 1 | 2 | var maxSize = 112 3 | var coolRotations = [-45, -22.5, 0, 22.5, 45] 4 | 5 | var text_noErrors = 'No errors found!' 6 | var text_cubeButton = 'See cube' 7 | var text_boneButton = 'See bone' 8 | var text_quickFix = 'Quick fix [_]' 9 | 10 | var codeViewDialog; 11 | 12 | const mathDiff = (a, b) => { 13 | return Math.abs(a - b); 14 | } 15 | 16 | var errorListAction; 17 | 18 | function generateErrorAction() { 19 | errorListAction = new Action('meg_error_list', { 20 | name: 'Show Error List', 21 | icon: 'report', 22 | category: 'edit', 23 | keybind: new Keybind({key: 'y'}), 24 | click: function () { 25 | displayErrorList(); 26 | } 27 | }) 28 | } 29 | 30 | function displayErrorList() { 31 | 32 | let templateHTML = ''; 33 | let quickFixableErrors = false; 34 | 35 | Outliner.elements.forEach(cube => { 36 | 37 | if(typeof cube.parent !== 'string' && cube.parent.name.toLowerCase() === 'hitbox') 38 | return; 39 | 40 | let cubeErrors = getCubeErrors(cube) 41 | if(cubeErrors.length > 0) { 42 | let parentName = typeof cube.parent === 'string' ? cube.parent : cube.parent.name 43 | let errorList = ''; 44 | var entryButton = ``; 45 | cubeErrors.forEach(error => { 46 | var button = ''; 47 | var errorNumber = error.substring(error.indexOf('[') + 1, error.lastIndexOf(']')); 48 | if(error.includes('rotation')) { 49 | var targetNumber = 0; 50 | coolRotations.forEach(rotation => { 51 | if(mathDiff(errorNumber, rotation)<2.5 && mathDiff(errorNumber, rotation)>0) { 52 | quickFixableErrors = true; 53 | 54 | targetNumber = rotation 55 | let orientation = error.split(' ')[1] 56 | button = entryButton; 57 | button = button.replace('_', targetNumber).replace('orientation', orientation).replace('newVal', targetNumber); 58 | } 59 | }) 60 | } 61 | if(!coolRotations.includes(parseFloat(errorNumber))) // Don't ask me why this needs to be checked *here*, JS & BB weird 62 | errorList += `
  • - ${error} ${button}
  • ` 63 | }) 64 | if(errorList.length!=0) { 65 | templateHTML += ` 66 | ${parentName}.${cube.name}: 67 | 68 | 69 |
    70 | ` 71 | } 72 | } 73 | }) 74 | 75 | Group.all.forEach(bone => { 76 | if(bone.name === 'hitbox') 77 | return; 78 | 79 | let boneErrors = getBoneErrors(bone) 80 | if(boneErrors.length > 0) { 81 | let errorList = ''; 82 | boneErrors.forEach(error => { 83 | errorList += `
  • - ${error}
  • ` 84 | }) 85 | templateHTML += ` 86 | ${bone.name}: 87 | 88 | 89 |
    90 | ` 91 | } 92 | }) 93 | 94 | let result = templateHTML ? templateHTML : '

    '+text_noErrors+'

    ' 95 | 96 | function quickFixCube(uuid, orientation, fix) { 97 | let cube = getCubeByUUID(uuid) 98 | if(cube!=null) { 99 | if(orientation==='X') 100 | cube.rotation[0] = fix; 101 | else if(orientation==='Y') 102 | cube.rotation[1] = fix; 103 | else 104 | cube.rotation[2] = fix; 105 | Blockbench.showQuickMessage("Fixed cube by ID "+uuid, 4000); 106 | } 107 | } 108 | 109 | codeViewDialog = new Dialog({ 110 | title: 'Errors', 111 | id: 'errors_menu', 112 | resizable: true, 113 | width: 650, 114 | singleButton: true, 115 | component: { 116 | methods: { 117 | 118 | fixCube(uuid, orientation, fix) { 119 | quickFixCube(uuid, orientation, fix); 120 | }, 121 | clickCube(uuid) { 122 | let cube = getCubeByUUID(uuid) 123 | if(cube!=null) { 124 | Outliner.selected.forEach(element => { 125 | element.unselect() 126 | }) 127 | cube.selectLow() 128 | TickUpdates.selection = true; 129 | } 130 | codeViewDialog.hide() 131 | }, 132 | clickBone(uuid) { 133 | let bone = getBoneByUUID(uuid) 134 | if(bone!=null) { 135 | Outliner.selected.forEach(element => { 136 | element.unselect() 137 | }) 138 | bone.selectLow() 139 | TickUpdates.selection = true; 140 | } 141 | codeViewDialog.hide() 142 | } 143 | }, 144 | template: `
    ${result}
    ` 145 | } 146 | }).show(); 147 | 148 | if(quickFixableErrors) { 149 | button = $(''); 150 | 151 | button.click(function () { 152 | Outliner.elements.forEach(cube => { 153 | let cubeErrors = getCubeErrors(cube) 154 | if(cubeErrors.length > 0) { 155 | cubeErrors.forEach(error => { 156 | var errorNumber = error.substring(error.indexOf('[') + 1, error.lastIndexOf(']')); 157 | if(error.includes('rotation')) { 158 | var targetNumber = 0; 159 | coolRotations.forEach(rotation => { 160 | if(mathDiff(errorNumber, rotation)<2.5 && mathDiff(errorNumber, rotation)>0) { 161 | targetNumber = rotation 162 | let orientation = error.split(' ')[1] 163 | quickFixCube(cube.uuid, orientation, targetNumber); 164 | } 165 | }) 166 | } 167 | }) 168 | } 169 | } 170 | )}) 171 | 172 | $('div.dialog_bar.button_bar').prepend(button); 173 | } 174 | } 175 | 176 | function getBoneErrors(bone) { 177 | let childrens = bone.children 178 | let errorList = [] 179 | let minX, maxX, minY, maxY, minZ, maxZ 180 | 181 | for(let cube in childrens) { 182 | if(childrens.hasOwnProperty(cube)) { 183 | let childCube = childrens[cube] 184 | if(childCube.type !== 'cube') 185 | continue 186 | 187 | // Set the variables as ints if they don't exist 188 | if(minX == null) minX = childCube.from[0] 189 | if(maxX == null) maxX = childCube.to[0] 190 | if(minY == null) minY = childCube.from[1] 191 | if(maxY == null) maxY = childCube.to[1] 192 | if(minZ == null) minZ = childCube.from[2] 193 | if(maxZ == null) maxZ = childCube.to[2] 194 | 195 | 196 | if(minX>childCube.from[0]) minX = childCube.from[0] 197 | if(maxXchildCube.from[1]) minY = childCube.from[1] 200 | if(maxYchildCube.from[2]) minZ = childCube.from[2] 203 | if(maxZ maxSize ) errorList.push('X exceeds '+maxSize+' in size [' + x + ']') 208 | if( (y = Math.abs(maxY - minY)) > maxSize ) errorList.push('Y exceeds '+maxSize+' in size [' + y + ']') 209 | if( (z = Math.abs(maxZ - minZ)) > maxSize ) errorList.push('Z exceeds '+maxSize+' in size [' + z + ']') 210 | return errorList 211 | } 212 | 213 | function getCubeErrors(cube) { 214 | let errorList = [] 215 | 216 | if(!coolRotations.includes(cube.rotation[0])) errorList.push('Illegal X rotation [' + cube.rotation[0] + ']') 217 | if(!coolRotations.includes(cube.rotation[1])) errorList.push('Illegal Y rotation [' + cube.rotation[1] + ']') 218 | if(!coolRotations.includes(cube.rotation[2])) errorList.push('Illegal Z rotation [' + cube.rotation[2] + ']') 219 | if( (x = cube.to[0]-cube.from[0]) > maxSize ) errorList.push('X size must be lower than '+maxSize + ' [' + x + ']') 220 | if( (y = cube.to[1]-cube.from[1]) > maxSize ) errorList.push('Y size must be lower than '+maxSize + ' [' + y + ']') 221 | if( (z = cube.to[2]-cube.from[2]) > maxSize ) errorList.push('Z size must be lower than '+maxSize + ' [' + z + ']') 222 | return errorList 223 | } 224 | 225 | function getCubeByUUID(uuid) { 226 | let result; 227 | Outliner.elements.forEach(currentCube => { 228 | if(uuid==currentCube.uuid) { 229 | result = currentCube; 230 | } 231 | }) 232 | return result; 233 | } 234 | 235 | function getBoneByUUID(uuid) { 236 | let result; 237 | Outliner.elements.forEach(currentCube => { 238 | if(currentCube.parent && uuid==currentCube.parent.uuid) { 239 | result = currentCube.parent; 240 | } 241 | }) 242 | return result; 243 | } 244 | var boneOptions = {}; 245 | 246 | var boneOptionAction; 247 | 248 | function generateBoneAction() { 249 | boneOptionAction = new Action('meg_bone_options', { 250 | name: 'Bone Options', 251 | icon: 'fas.fa-cogs', 252 | category: 'edit', 253 | //keybind: new Keybind({key: 113}), // Do we want to have a keybind? 254 | click: function () { 255 | setBoneTypeMenu().show(); 256 | } 257 | }) 258 | Group.prototype.menu.structure.push('_'); 259 | Group.prototype.menu.addAction(boneOptionAction) 260 | } 261 | 262 | function setBoneTypeMenu(){ 263 | 264 | let op = boneOptions[Group.selected.uuid]; 265 | function getHead() { 266 | if(op) 267 | return op.is_head; 268 | return false; 269 | } 270 | function getMount() { 271 | if(op) 272 | return op.is_mount; 273 | return false; 274 | } 275 | function getHand() { 276 | if(op) 277 | return op.hand; 278 | return 'none'; 279 | } 280 | function getDuplicate() { 281 | if(op) 282 | return op.duplicate; 283 | return ''; 284 | } 285 | function getVariant() { 286 | if(op) 287 | return op.is_variant; 288 | return 'none'; 289 | } 290 | function getExtra() { 291 | if(op) 292 | return op.extra; 293 | return ''; 294 | } 295 | 296 | let boneTypeDialog = new Dialog({ 297 | id: 'bone_option_dialog', 298 | title: 'Bone Options', 299 | form: { 300 | isHead: { 301 | label: 'Head', 302 | type: 'checkbox', 303 | value: getHead() 304 | }, 305 | isMount: { 306 | label: 'Mount', 307 | type: 'checkbox', 308 | value: getMount() 309 | }, 310 | isHand: { 311 | label: 'Hand', 312 | type: 'select', 313 | options: { 314 | none: 'Not Hand', 315 | left: 'Left', 316 | right: 'Right' 317 | }, 318 | value: getHand() 319 | }, 320 | isDuplicate: { 321 | label: 'Duplicate', 322 | type: 'input', 323 | placeholder: 'not duplicate', 324 | value: getDuplicate() 325 | }, 326 | isVariant: { 327 | label: 'Bone Variant', 328 | type: 'select', 329 | options: { 330 | none: 'Default', 331 | texture: 'Texture', 332 | model: 'Model' 333 | }, 334 | value: getVariant() 335 | }, 336 | extraOptions: { 337 | label: 'Extra', 338 | type: 'textarea', 339 | placeholder: 'option1=value1\noption2=value2\n...', 340 | value: getExtra() 341 | } 342 | }, 343 | onConfirm: function(formData) { 344 | if(op) { 345 | op.is_head = formData.isHead; 346 | op.is_mount = formData.isMount; 347 | op.hand = formData.isHand; 348 | op.duplicate = formData.isDuplicate; 349 | op.is_variant = formData.isVariant; 350 | op.extra = formData.extraOptions; 351 | }else { 352 | boneOptions[Group.selected.uuid] = { 353 | is_head: formData.isHead, 354 | is_mount: formData.isMount, 355 | hand: formData.isHand, 356 | duplicate: formData.isDuplicate, 357 | is_variant: formData.isVariant, 358 | extra: formData.extraOptions 359 | }; 360 | } 361 | this.hide(); 362 | }, 363 | onCancel: function(formData) { 364 | this.hide(); 365 | } 366 | }); 367 | 368 | return boneTypeDialog; 369 | } 370 | var selectVariant; 371 | var createVariant; 372 | var deleteVariant; 373 | var viewVariant; 374 | var setVariant; 375 | var renameVariant; 376 | 377 | var variantBones = {}; 378 | 379 | class VariantSelect extends BarSelect { 380 | constructor(id, data) { 381 | super(id, data) 382 | } 383 | addOption(key, name) { 384 | this.options[key] = name; 385 | this.values.push(key); 386 | if(key in variantBones) 387 | return; 388 | variantBones[key] = { 389 | name: name, 390 | bones: [] 391 | }; 392 | } 393 | removeOption(key) { 394 | let index = this.values.indexOf(key); 395 | if(index > -1) { 396 | delete this.options[key]; 397 | this.values.splice(index, 1); 398 | delete variantBones[key]; 399 | } 400 | } 401 | renameOption(key, newName) { 402 | let newKey = newName.toLowerCase().replace(' ', '_'); 403 | variantBones[newKey] = { 404 | name: newName, 405 | bones: variantBones[key].bones 406 | }; 407 | removeOption(key); 408 | addOptions(newKey, newName); 409 | } 410 | containsOption(key) { 411 | return (key in this.options); 412 | } 413 | } 414 | 415 | function generateVariantActions() { 416 | 417 | selectVariant = new VariantSelect('meg_variant_select', { 418 | name: 'Model Variant', 419 | description: 'Show other variants of this model.', 420 | condition: {modes: ['edit', 'paint', 'animate']}, 421 | value: 'default', 422 | options: { 423 | all: 'All', 424 | default: 'Default' 425 | }, 426 | onChange: function(option) { 427 | showVariant(option.get()); 428 | } 429 | }); 430 | 431 | createVariant = new Action('meg_variant_add', { 432 | name: 'Create Variant', 433 | icon: 'person_add', 434 | category: 'edit', 435 | click: function () { 436 | showCreateVariantWindow(); 437 | } 438 | }); 439 | 440 | deleteVariant = new Action('meg_variant_remove', { 441 | name: 'Remove Variant', 442 | icon: 'delete', 443 | category: 'edit', 444 | click: function () { 445 | deleteSelectedVariant(); 446 | } 447 | }); 448 | 449 | viewVariant = new Action('meg_variant_show', { 450 | name: 'View Current Variant', 451 | icon: 'visibility', 452 | category: 'edit', 453 | click: function () { 454 | showVariant(selectVariant.get()); 455 | } 456 | }); 457 | 458 | setVariant = new Action('meg_variant_set', { 459 | name: 'Set View as Variant', 460 | icon: 'save', 461 | category: 'edit', 462 | click: function () { 463 | let variantSettings = []; 464 | Group.all.forEach(element => { 465 | 466 | if(!isBoneDefault(element.uuid)) // Don't loop through variant bones. 467 | return; 468 | 469 | element.children.every(group => { 470 | if(group.type === 'group' && !isBoneDefault(group.uuid) && group.visibility) { // Isolate variant bones. 471 | variantSettings.push(group.uuid); 472 | return false; // Immediately break out of look so it only selects 1 variant bone. 473 | } 474 | return true; 475 | }); 476 | }); 477 | variantBones[selectVariant.get()].bones = variantSettings; 478 | Blockbench.showToastNotification({ 479 | text: `Saved current view to ${variantBones[selectVariant.get()].name}.`, 480 | color: 'Azure', 481 | expire: 2000 482 | }); 483 | } 484 | }); 485 | 486 | renameVariant = new Action('meg_variant_rename', { 487 | name: 'Rename Current Variant', 488 | icon: 'text_format', 489 | category: 'edit', 490 | click: function () { 491 | showRenameVariantWindow(); 492 | } 493 | }); 494 | } 495 | 496 | function addOptions(key, name) { 497 | selectVariant.addOption(key, name); 498 | selectVariant.set(key); 499 | } 500 | 501 | function removeOption(key) { 502 | selectVariant.removeOption(key); 503 | } 504 | 505 | function showCreateVariantWindow() { 506 | Blockbench.textPrompt( 507 | '', 508 | 'New Variant', 509 | function(text) { 510 | let key = text.toLowerCase().replace(' ', '_'); 511 | if(selectVariant.containsOption(key)) { 512 | Blockbench.showToastNotification({ 513 | text: `Variant ${text} already exists.`, 514 | color: 'Tomato', 515 | expire: 2000 516 | }); 517 | }else { 518 | addOptions(key, text); 519 | selectVariant.set(key); 520 | Blockbench.showToastNotification({ 521 | text: `Variant created - ${text}.`, 522 | color: 'Azure', 523 | expire: 2000 524 | }); 525 | } 526 | } 527 | ); 528 | $('#text_input div.dialog_handle').text('Create Variant'); 529 | } 530 | 531 | function deleteSelectedVariant() { 532 | let id = selectVariant.get(); 533 | if(id === 'all' || id === 'default') { 534 | Blockbench.showToastNotification({ 535 | text: `You can't delete this variant.`, 536 | color: 'Tomato', 537 | expire: 2000 538 | }); 539 | return; 540 | } 541 | Blockbench.showToastNotification({ 542 | text: `Variant deleted - ${selectVariant.getNameFor(selectVariant.get())}.`, 543 | color: 'Azure', 544 | expire: 2000 545 | }); 546 | removeOption(selectVariant.get()); 547 | selectVariant.set('default'); 548 | showVariant('default'); 549 | } 550 | 551 | function showVariant(variant) { 552 | 553 | if(variant === 'all') { 554 | Group.all.forEach(element => { 555 | element.visibility = true; 556 | element.children.forEach(cube => { 557 | cube.visibility = true; 558 | }); 559 | }); 560 | Canvas.updateVisibility(); 561 | return; 562 | } 563 | 564 | if(variant === 'default') { 565 | Group.all.forEach(element => { 566 | element.visibility = !(element.uuid in boneOptions) || boneOptions[element.uuid].is_variant === 'none'; 567 | element.children.forEach(cube => { 568 | cube.visibility = element.visibility; 569 | }); 570 | }); 571 | Canvas.updateVisibility(); 572 | return; 573 | } 574 | 575 | let variantSettings = variantBones[variant].bones; 576 | if(!variantSettings) 577 | return; 578 | Group.all.forEach(element => { 579 | 580 | if(!isBoneDefault(element.uuid)) // Skipping all bones that are variant bones. 581 | return; 582 | 583 | let variantVis; 584 | element.children.forEach(group => { 585 | if(group.type !== 'group' || isBoneDefault(group.uuid)) // Isolating children that are variant bones. 586 | return; 587 | let vis = variantSettings.includes(group.uuid); 588 | group.visibility = vis; 589 | group.children.forEach(cube => { 590 | if(cube.type === 'group') // Groups within variant bones are not allowed. Skipping. 591 | return; 592 | cube.visibility = vis; 593 | }); 594 | 595 | variantVis |= vis; // variant bone exists trigger. 596 | }); 597 | 598 | element.visibility = !variantVis; // If a variant bone is present, hiding default bone. 599 | element.children.forEach(cube => { 600 | if(cube.type === 'group') // Isolating children cubes that are directly under this bone. 601 | return; 602 | cube.visibility = !variantVis; 603 | }); 604 | 605 | }); 606 | Canvas.updateVisibility(); 607 | } 608 | 609 | function isBoneDefault(uuid) { 610 | return !(uuid in boneOptions) || boneOptions[uuid].is_variant === 'none'; 611 | } 612 | 613 | function showRenameVariantWindow() { 614 | 615 | if(selectVariant.get() === 'all' || selectVariant.get() === 'default') { 616 | Blockbench.showToastNotification({ 617 | text: `You cannot rename this variant.`, 618 | color: 'Tomato', 619 | expire: 2000 620 | }); 621 | return; 622 | } 623 | 624 | Blockbench.textPrompt( 625 | '', 626 | 'New Name', 627 | function(text) { 628 | let key = text.toLowerCase().replace(' ', '_'); 629 | if(selectVariant.containsOption(key)) { 630 | Blockbench.showToastNotification({ 631 | text: `Variant ${text} already exists.`, 632 | color: 'Tomato', 633 | expire: 2000 634 | }); 635 | }else { 636 | selectVariant.renameOption(selectVariant.get(), text); 637 | Blockbench.showToastNotification({ 638 | text: `Variant Rename - ${text}.`, 639 | color: 'Azure', 640 | expire: 2000 641 | }); 642 | } 643 | } 644 | ); 645 | $('#text_input div.dialog_handle').text('Rename Variant'); 646 | } 647 | var compileCallback = (e) => { 648 | e.model.bone_option = boneOptions; 649 | e.model.variant = variantBones; 650 | }; 651 | 652 | var parseCallback = (e) => { 653 | Object.assign(boneOptions, e.model.bone_option); 654 | Object.assign(variantBones, e.model.variant); 655 | 656 | for (const key in variantBones) { 657 | if (variantBones.hasOwnProperty(key)) { 658 | selectVariant.addOption(key, variantBones[key].name); 659 | } 660 | } 661 | }; 662 | 663 | (function() { 664 | 665 | let button = $(`
    `) 666 | let modeSelectCallback = (e)=> { 667 | if(e.mode.id == 'edit') 668 | $('#left_bar').append(button) 669 | else 670 | button.detach(); 671 | 672 | } 673 | 674 | Plugin.register('meg', { 675 | title: 'ModelEngine', 676 | author: 'Pande, Ticxo', 677 | icon: 'icon', 678 | description: 'A ModelEngine addon for Blockbench', 679 | version: '0.1.0', 680 | variant: 'both', 681 | onload() { 682 | // Events 683 | Blockbench.on('select_mode', modeSelectCallback); 684 | Codecs.project.on('compile', compileCallback); 685 | Codecs.project.on('parse', parseCallback); 686 | 687 | // Menus 688 | generateBoneAction(); 689 | generateErrorAction(); 690 | generateVariantActions(); 691 | 692 | if(Mode.selected.id == 'edit') 693 | $('#left_bar').append(button); 694 | 695 | Blockbench.showToastNotification({ 696 | text: 'Model Engine Plugin is loaded!', 697 | color: 'Azure', 698 | expire: 2000 699 | }); 700 | }, 701 | 702 | onunload() { 703 | this.onuninstall() 704 | }, 705 | 706 | onuninstall() { 707 | 708 | button.detach(); 709 | 710 | Codecs.project.events.compile.remove(compileCallback); 711 | errorListAction.delete(); 712 | boneOptionAction.delete(); 713 | selectVariant.delete(); 714 | } 715 | }) 716 | })(); -------------------------------------------------------------------------------- /blockbench plugins/meg_utils.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | Plugin.register('meg_utils', { 4 | title: 'Model Engine Utils', 5 | author: 'Ticxo', 6 | description: 'Make your life easier.', 7 | icon: 'icon', 8 | version: '0.0.1', 9 | variant: 'both', 10 | onload() { 11 | setFormat(); 12 | setPositionScaler(); 13 | } 14 | }); 15 | 16 | })(); 17 | 18 | function setFormat() { 19 | let format = new ModelFormat({ 20 | id: 'free', 21 | icon: 'icon-format_free', 22 | meshes: true, 23 | rotate_cubes: true, 24 | bone_rig: true, 25 | centered_grid: true, 26 | rotation_limit: false, 27 | optional_box_uv: true, 28 | uv_rotation: true, 29 | animated_textures: true, 30 | animation_mode: true, 31 | locators: true, 32 | codec: Formats.free.codec 33 | }); 34 | Formats.free.codec.format = format; 35 | 36 | Blockbench.on('update_selection', () => { 37 | Formats.free.codec.format.rotation_limit = !Group.selected; 38 | }); 39 | } 40 | 41 | function setPositionScaler() { 42 | pos_scale_action = new Action({ 43 | id:"scale_animations", 44 | name: 'Scale Animations', 45 | icon: 'settings_overscan', 46 | category: 'edit', 47 | click: function(ev) { 48 | 49 | new Dialog({ 50 | id: 'scale_animations_dialog', 51 | title: 'Scale Position Keyframes', 52 | form: { 53 | origin: { 54 | label: 'Origin', 55 | type: 'vector' 56 | }, 57 | scale: { 58 | label: 'Scale', 59 | type: 'vector', 60 | value: [1, 1, 1] 61 | } 62 | }, 63 | onConfirm: function(formData) { 64 | 65 | let ox = formData.origin[0]; 66 | let oy = formData.origin[1]; 67 | let oz = formData.origin[2]; 68 | 69 | let sx = formData.scale[0]; 70 | let sy = formData.scale[1]; 71 | let sz = formData.scale[2]; 72 | 73 | Undo.initEdit({animations: Animator.animations}); 74 | Animator.animations.forEach(a => { 75 | for (let key in a.animators) { 76 | a.animators[key].position.forEach(p => { 77 | p.data_points.forEach(points => { 78 | points.x = (points.x - ox) * sx + ox; 79 | points.y = (points.y - oy) * sy + oy; 80 | points.z = (points.z - oz) * sz + oz; 81 | }); 82 | }); 83 | } 84 | }); 85 | Undo.finishEdit('scale keyframes') 86 | 87 | this.hide() 88 | } 89 | }).show(); 90 | 91 | } 92 | }); 93 | MenuBar.addAction(pos_scale_action, 'filter'); 94 | } -------------------------------------------------------------------------------- /demo/Model-Engine-Demo-R2.5.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/Model-Engine-Demo-R2.5.3.jar -------------------------------------------------------------------------------- /demo/Model-Engine-Demo-R3.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/Model-Engine-Demo-R3.0.2.jar -------------------------------------------------------------------------------- /demo/legacy/1.0/Model-Engine-Demo-r1.0.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/1.0/Model-Engine-Demo-r1.0.9.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-B3.0.0-0d5d6e6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-B3.0.0-0d5d6e6.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-B3.0.0-Build-040decb.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-B3.0.0-Build-040decb.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R2.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R2.4.1.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R2.4.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R2.4.2.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R2.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R2.5.0.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R2.5.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R2.5.1.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R2.5.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R2.5.2.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R3.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R3.0.0.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-R3.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-R3.0.1.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-b2.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-b2.0.0.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-b2.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-b2.0.1.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-b2.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-b2.0.2.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-b2.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-b2.0.3.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-b2.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-b2.0.4.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.0.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.1.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.2.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.3.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.4.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.5.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.6.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.7.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.1.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.1.8.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.2.0.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.3.0.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.3.1.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.3.2.jar -------------------------------------------------------------------------------- /demo/legacy/Model-Engine-Demo-r2.4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/demo/legacy/Model-Engine-Demo-r2.4.0.jar -------------------------------------------------------------------------------- /version patch/ME-1.18-Compatibility-Patch.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/version patch/ME-1.18-Compatibility-Patch.jar -------------------------------------------------------------------------------- /wiki/KindletronJR.yml: -------------------------------------------------------------------------------- 1 | KindletronJR: 2 | Type: SILVERFISH 3 | Health: 20 4 | Damage: 0 5 | Skills: 6 | - model{mid=kindletronjr} @self ~onSpawn 7 | - skill{s=KindletronJRInit;sync=true} @self ~onAttack 8 | Options: 9 | Silent: true 10 | MovementSpeed: 0.1 11 | MaxCombatDistance: 25 12 | PreventOtherDrops: true 13 | PreventBlockInfection: true -------------------------------------------------------------------------------- /wiki/KindletronSkills.yml: -------------------------------------------------------------------------------- 1 | KindletronJRInit: 2 | Skills: 3 | - CancelEvent 4 | - skill{s=KindletronJRPunch} @self 5 | 6 | KindletronJRPunch: 7 | Cooldown: 1.05 8 | Skills: 9 | - state{s=attack;li=3;lo=2} @self 10 | - stun{d=25} @self 11 | - delay 25 12 | - totem{ch=1;onStart=KindletronJRPunchDamage;int=1;hR=3;md=1} @Forward{f=0.5} 13 | 14 | KindletronJRPunchDamage: 15 | Skills: 16 | - damage{amount=3} @EntitiesNearOrigin{r=2} -------------------------------------------------------------------------------- /wiki/MythicMobs/MM_All.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/MythicMobs/MM_All.png -------------------------------------------------------------------------------- /wiki/MythicMobs/MM_Mechanics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/MythicMobs/MM_Mechanics.png -------------------------------------------------------------------------------- /wiki/MythicMobs/MM_Targeter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/MythicMobs/MM_Targeter.png -------------------------------------------------------------------------------- /wiki/Scarecrow.yml: -------------------------------------------------------------------------------- 1 | Scarecrow: 2 | Type: PIG 3 | Display: '&7&lScarecrow' 4 | Health: 20 5 | Damage: 1 6 | Equipment: 7 | - shears:0 1 1 8 | - composter:5 1 1 9 | Options: 10 | NoDamageTicks: 5 11 | FollowRange: 60 12 | PreventOtherDrops: true 13 | Silent: true 14 | Skills: 15 | - model{mid=scarecrow;n=true;mt=true} @self ~onSpawn 16 | - state{mid=scarecrow;s=damaged;li=0;lo=0} @self ~onDamaged 17 | - mountmodel @trigger ~onInteract -------------------------------------------------------------------------------- /wiki/animation/attack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/attack.gif -------------------------------------------------------------------------------- /wiki/animation/export_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/export_animation.png -------------------------------------------------------------------------------- /wiki/animation/exported_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/exported_location.png -------------------------------------------------------------------------------- /wiki/animation/idle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/idle.gif -------------------------------------------------------------------------------- /wiki/animation/kindletronjr_in_game.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/kindletronjr_in_game.gif -------------------------------------------------------------------------------- /wiki/animation/loop_and_override.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/loop_and_override.png -------------------------------------------------------------------------------- /wiki/animation/state_and_priority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/state_and_priority.png -------------------------------------------------------------------------------- /wiki/animation/walk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/animation/walk.gif -------------------------------------------------------------------------------- /wiki/blockbench/bb_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/blockbench/bb_input.png -------------------------------------------------------------------------------- /wiki/blockbench/file_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/blockbench/file_structure.png -------------------------------------------------------------------------------- /wiki/blockbench/input_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/blockbench/input_animation.png -------------------------------------------------------------------------------- /wiki/blockbench/input_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/blockbench/input_model.png -------------------------------------------------------------------------------- /wiki/blockbench/input_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/blockbench/input_texture.png -------------------------------------------------------------------------------- /wiki/blockbench/model_engine_converter.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | var batch_convert = new Action('batch_convert', { 4 | name: 'Batch Convert', 5 | description: 'Convert all Bedrock Entities to bbmodels.', 6 | icon: 'mediation', 7 | click: function() { 8 | convert(); 9 | } 10 | }); 11 | 12 | var help = new Action('help_dialog', { 13 | name: 'Help', 14 | description: 'Guide on using this tool.', 15 | icon: 'help', 16 | click: function() { 17 | help_dialog.show(); 18 | } 19 | }); 20 | 21 | var help_dialog = new Dialog({ 22 | id: 'model_engine_help_dialog', 23 | title: 'Help', 24 | width: 800, 25 | lines : [ 26 | '

    What is this plugin?

    This plugin can convert multiple Bedrock Entity models into Blockbench project. It is primarily used for updating models from Model Engine 1.0 to 2.0.

    How to use?

    First, create a folder structure like this.

    Then, copy the models, textures and animations to their respective folders, as shown below.

    In Blockbench, go to Model Engine tab, and select Batch Convert. Blockbench would request some file inputs. Select all models you have copied over, and click Open.

    You can now see all the converted project files under output folder.

    ' 27 | ], 28 | singleButton: true 29 | }); 30 | 31 | Plugin.register('model_engine_converter', { 32 | title: 'Model Engine Batch Converter', 33 | author: 'Ticxo', 34 | description: 'Batch converts all bedrock entities to bbmodels.', 35 | icon: 'mediation', 36 | version: '0.0.1', 37 | variant: 'desktop', 38 | 39 | onload() { 40 | // Create bar 41 | new BarMenu('model_engine', [], { 42 | name: "Model Engine" 43 | }); 44 | 45 | MenuBar.update(); 46 | MenuBar.addAction(batch_convert, 'model_engine'); 47 | MenuBar.addAction(help, 'model_engine'); 48 | }, 49 | 50 | onunload() { 51 | batch_convert.delete(); 52 | help.delete(); 53 | } 54 | }); 55 | 56 | })(); 57 | 58 | function convert() { 59 | Blockbench.import({ 60 | extensions: ['json'], 61 | type: 'Bedrock Entity Model', 62 | readtype: 'text', 63 | resource_id: 'model', 64 | multiple: true 65 | }, files => { 66 | files.forEach(file => { 67 | // Get the files 68 | var output = getPath(file.path, 'output\\' + file.name, 'bbmodel'); 69 | var texture = new Texture({keep_size: true}).fromPath(getPath(file.path, 'texture\\' + file.name, 'png')).add(); 70 | var animation = getPath(file.path, 'animation\\' + file.name, 'animation.json'); 71 | 72 | // Parse the file using bedrock codec 73 | Codecs.bedrock.parse(autoParseJSON(file.content)); 74 | // Load animation 75 | Blockbench.read([animation], { 76 | readtype: 'text' 77 | }, files => { 78 | autoImportFile(files[0]); 79 | } 80 | ); 81 | 82 | // Convert to free type 83 | Formats['free'].convertTo(); 84 | 85 | // Save the file using bbmodel codec 86 | Blockbench.writeFile(output, { 87 | content: Codecs.project.compile() 88 | }); 89 | // Remove the old texture file 90 | texture.remove(); 91 | 92 | // Reset the workspace 93 | resetProject(); 94 | Modes.options.start.select(); 95 | Modes.vue.$forceUpdate(); 96 | }); 97 | }); 98 | } 99 | 100 | function getPath(path, name, extention) { 101 | var ar = path.split("\\"); 102 | ar.pop(); 103 | 104 | var name = name.split("."); 105 | name.pop(); 106 | name.push(extention); 107 | name = name.join("."); 108 | 109 | ar.push(name); 110 | return ar.join("\\"); 111 | } 112 | 113 | function autoImportFile(file) { 114 | let json = autoParseJSON(file.content) 115 | let keys = []; 116 | 117 | for (var key in json.animations) { 118 | keys.push(key); 119 | } 120 | 121 | file.json = json; 122 | if (keys.length > 0) { 123 | Animator.loadFile(file, keys); 124 | } 125 | } -------------------------------------------------------------------------------- /wiki/blockbench/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/blockbench/output.png -------------------------------------------------------------------------------- /wiki/modeling/ME-Model-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/ME-Model-1.png -------------------------------------------------------------------------------- /wiki/modeling/ME-Model-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/ME-Model-2.png -------------------------------------------------------------------------------- /wiki/modeling/ME-Model-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/ME-Model-3.png -------------------------------------------------------------------------------- /wiki/modeling/ME-Model-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/ME-Model-4.png -------------------------------------------------------------------------------- /wiki/modeling/ME-Model-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/ME-Model-5.png -------------------------------------------------------------------------------- /wiki/modeling/bone_and_cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/bone_and_cube.png -------------------------------------------------------------------------------- /wiki/modeling/create_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/create_project.png -------------------------------------------------------------------------------- /wiki/modeling/create_project_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/create_project_2.png -------------------------------------------------------------------------------- /wiki/modeling/deselect_box_uv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/deselect_box_uv.png -------------------------------------------------------------------------------- /wiki/modeling/exporting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/exporting.png -------------------------------------------------------------------------------- /wiki/modeling/kindletronjr_in_game.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ticxo/Model-Engine-Wiki/e261dd475def300f096d92392287987b75ff3cb3/wiki/modeling/kindletronjr_in_game.gif --------------------------------------------------------------------------------