From d0b0952e426867f621348dd030bba71ad4a8a442 Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Sat, 28 Sep 2024 10:12:58 -0400 Subject: [PATCH 1/7] Auto convert bedrock format into format that works properly --- src/azurelib_utils/codec.js | 40 +++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/src/azurelib_utils/codec.js b/src/azurelib_utils/codec.js index 316d4102..ee2bc522 100644 --- a/src/azurelib_utils/codec.js +++ b/src/azurelib_utils/codec.js @@ -42,14 +42,42 @@ function onBedrockCompile(e) { function animatorBuildFile() { const res = Original.get(Animator).buildFile.apply(this, arguments); - if (Format.id === "azure_model") { - Object.assign( - res, - { - 'azurelib_format_version': azurelibSettings.formatVersion, + + if (Format.id !== "azure_model") return res; + + Object.assign(res, { + 'azurelib_format_version': azurelibSettings.formatVersion, + }); + + const animations = res.animations; + if (!animations) return res; + + for (const animation in animations) { + const bones = animations[animation]?.bones; + if (!bones) continue; + + for (const boneName in bones) { + const bone = bones[boneName]; + for (const animationGroupType in bone) { + const animationGroup = bone[animationGroupType]; + for (const timestamp in animationGroup) { + const keyframe = animationGroup[timestamp]; + + if (keyframe) { + if (keyframe["lerp_mode"]) delete keyframe["lerp_mode"]; + + let bedrockKeyframeData = keyframe["pre"] || keyframe["post"]; + if (bedrockKeyframeData) { + Object.assign(keyframe, bedrockKeyframeData); + } + delete keyframe["pre"]; + delete keyframe["post"]; + } + } } - ); + } } + return res; } From 8aefae9d8265aedddf0c8d81805ee21ad44edfd4 Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Sat, 28 Sep 2024 10:21:46 -0400 Subject: [PATCH 2/7] Remove item display transforms from geo file exported for azure_models --- src/azurelib_utils/codec.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/azurelib_utils/codec.js b/src/azurelib_utils/codec.js index ee2bc522..3f284621 100644 --- a/src/azurelib_utils/codec.js +++ b/src/azurelib_utils/codec.js @@ -37,7 +37,14 @@ function onProjectParse(e) { } function onBedrockCompile(e) { - console.log('onBedrockCompile e:', e); + if (Format.id !== "azure_model") return; + + const geometry = e.model?.["minecraft:geometry"]; + if (geometry) { + geometry.forEach((geo) => { + delete geo.item_display_transforms; + }); + } } function animatorBuildFile() { From be88e7f8abb609d07a045f6cd2746a2582a79fec Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Sat, 28 Sep 2024 10:29:54 -0400 Subject: [PATCH 3/7] Update armorTemplate.json --- src/azurelib_utils/armorTemplate.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/azurelib_utils/armorTemplate.json b/src/azurelib_utils/armorTemplate.json index 162f4a7d..10f88c5e 100644 --- a/src/azurelib_utils/armorTemplate.json +++ b/src/azurelib_utils/armorTemplate.json @@ -280,28 +280,28 @@ ] }, { - "name": "bipedRightLeg", + "name": "bipedLeftLeg", "uuid": "37231be7-a8ef-22ca-7fea-40aed58003bb", "export": true, "isOpen": true, "visibility": true, "autouv": 0, "origin": [ - 2, + -2, 12, 0 ], "children": [ "17b9bae0-356a-9bba-fad9-4672e2671191", { - "name": "armorRightLeg", + "name": "armorLeftLeg", "uuid": "e4b19746-2d17-1f56-befe-00718165ae50", "export": true, "isOpen": true, "visibility": true, "autouv": 0, "origin": [ - 2, + -2, 12, 0 ], @@ -310,14 +310,14 @@ ] }, { - "name": "armorRightBoot", + "name": "armorLeftBoot", "uuid": "9fe26b9a-ad66-9e6b-2fa2-4168e333b4be", "export": true, "isOpen": true, "visibility": true, "autouv": 0, "origin": [ - 2, + -2, 12, 0 ], @@ -328,28 +328,28 @@ ] }, { - "name": "bipedLeftLeg", + "name": "bipedRightLeg", "uuid": "45c031a5-b6be-e0a7-5454-b45d07f28429", "export": true, "isOpen": true, "visibility": true, "autouv": 0, "origin": [ - -2, + 2, 12, 0 ], "children": [ "7b31bac4-dc40-2b93-1204-7bbdcfe7d924", { - "name": "armorLeftLeg", + "name": "armorRightLeg", "uuid": "60238f18-e74b-c863-cb45-2e2f162221bd", "export": true, "isOpen": true, "visibility": true, "autouv": 0, "origin": [ - -2, + 2, 12, 0 ], @@ -358,14 +358,14 @@ ] }, { - "name": "armorLeftBoot", + "name": "armorRightBoot", "uuid": "eb3db34b-ccfe-dae9-ac4d-4e22c3222f70", "export": true, "isOpen": true, "visibility": true, "autouv": 0, "origin": [ - -2, + 2, 12, 0 ], @@ -379,4 +379,4 @@ "textures": [ ] -} +} \ No newline at end of file From f39d7ee6ff1be7453f51093dbe3716671914b2e3 Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Sat, 28 Sep 2024 10:30:01 -0400 Subject: [PATCH 4/7] Update codec.js --- src/azurelib_utils/codec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/azurelib_utils/codec.js b/src/azurelib_utils/codec.js index 3f284621..17e4c4d4 100644 --- a/src/azurelib_utils/codec.js +++ b/src/azurelib_utils/codec.js @@ -286,9 +286,7 @@ export function maybeExportItemJson(options = {}, as) { } const blockmodelString = JSON.stringify(blockmodel, null, 2); - var scope = codec; - let path = azurelibSettings.itemModelPath; Blockbench.export({ From 544ba8d4917319879b00ae9732a5445a0c8f9aad Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:15:59 -0400 Subject: [PATCH 5/7] Make the about.md more pretty --- plugins/azurelib_utils/about.md | 81 ++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/plugins/azurelib_utils/about.md b/plugins/azurelib_utils/about.md index d13d0b7b..d75783cd 100644 --- a/plugins/azurelib_utils/about.md +++ b/plugins/azurelib_utils/about.md @@ -1,44 +1,51 @@ -Download the mod library here on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/azurelib) and [Modrinth](https://modrinth.com/mod/azurelib). +

+ + discord +

+

+AzureLib represents a branch derived from Geckolib 4.x, serving as an animation engine tailored for Minecraft Mods. It boasts various features, including support for intricate 3D keyframe-driven animations, over 30 different easing functions, concurrent animation capabilities, sound and particle keyframes, event-based keyframes, and numerous other functionalities. +
-Wiki found here: https://wiki.azuredoom.com/ +

+Download the mod here on: +

+

+ curseforge + modrinth +

+ +
+ +

+Wiki found here +

+ +

Supported Minecraft versions: -- **1.16.5 Forge/Fabric** -- **1.17.1 Forge/Fabric** -- **1.18.2 Forge/Fabric** -- **1.19.2 Forge/Fabric** -- **1.19.4 Forge/Fabric** -- **1.20.1 Forge/NeoForge/Fabric** -- **1.20.4 NeoForge/Fabric** -- **1.20.6 NeoForge/Fabric** - -To add to your code, please do the following: - -```gradle -repositories { - // The Maven with the mods source - maven { url 'https://libs.azuredoom.com:4443/mods' } -} - -dependencies { - //Common 1.20.1+ Latest Only - compileOnly "mod.azure.azurelib:azurelib-common-MCVER:MODVER" - - //Fabric or Quilt and older - modImplementation "mod.azure.azurelib:azurelib-fabric-MCVER:MODVER" - //Fabric bug is requiring this - modApi "com.terraformersmc:modmenu:VERSION" - - //Forge 1.20.1 and older (Forge is no longer supported) - implementation fg.deobf("mod.azure.azurelib:azurelib-forge-MCVER:MODVER") - - //NeoForge 1.20.1 - implementation fg.deobf("mod.azure.azurelib:azurelib-neo-MCVER:MODVER") - - //NeoForge 1.20.4+ - implementation "mod.azure.azurelib:azurelib-neo-MCVER:MODVER" -} +

+ +``` +- 1.15.2 Forge +- 1.16.5 Forge/Fabric +- 1.17.1 Forge/Fabric +- 1.18.2 Forge/Fabric +- 1.19.2 Forge/Fabric +- 1.19.4 Forge/Fabric +- 1.20.1 Forge/NeoForge/Fabric +- 1.20.4+ NeoForge/Fabric +- 1.21+ NeoForge/Fabric ``` + +

+Need a server to play with friends? Don't know how to setup one? Just rent an already configured server from BisectHosting! + logo + + +

+Click on the picture above, select plan(at least 4GB), and use my code azuredoom to get 25% off your first month and enjoy playing with your friends! +

+