Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureLib Utils v1.0.3 #410

Merged
merged 17 commits into from
Aug 20, 2023
Merged
5 changes: 3 additions & 2 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,9 @@
"icon": "azureicon.png",
"description": "Create animated blocks, items, entity, and armor using the AzureLib library and plugin. This is a fork of Geckolib and cross compatibility will not be promised in the future.",
"tags": ["Minecraft: Java Edition"],
"version": "1.0.2",
"min_version": "4.0.0",
"version": "1.0.3",
"min_version": "4.8.0",
"new_repository_format": true,
"await_loading": true,
"variant": "both",
"creation_date": "2023-04-04"
Expand Down
32 changes: 32 additions & 0 deletions plugins/azurelib_utils/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Create animated blocks, items, entity, and armor using the AzureLib library and plugin. This is a fork of Geckolib and cross compatibility will not be promised in the future.

Download the mod library here on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/azurelib) and [Modrinth](https://modrinth.com/mod/azurelib).

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.3 Forge/Fabric**
- **1.19.4 Forge/Fabric**
- **1.20.1 Forge/NeoForge/Fabric**

To add to your code, please do the following:

```gradle
repositories {
// The Maven with the mods source
maven { url 'https://dl.cloudsmith.io/public/azuredoom-mods/azurelib/maven/' }
}

dependencies {
//Fabric or Quilt
modImplementation 'mod.azure.azurelib:azurelib-fabric-MCVERSION:MODVERSION'

//Forge
implementation fg.deobf('mod.azure.azurelib:azurelib-forge-MCVERSION:MODVERSION')

//NeoForge
implementation fg.deobf('mod.azure.azurelib:azurelib-neo-MCVERSION:MODVERSION')
}
```
2 changes: 1 addition & 1 deletion plugins/azurelib_utils/azurelib_utils.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions plugins/azurelib_utils/members.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
maintainers:
- AzureDoom
9 changes: 0 additions & 9 deletions src/azurelib_utils/animationUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { EASING_OPTIONS, EASING_DEFAULT, getEasingArgDefault, parseEasingArg } f

const easingRegExp = /^ease(InOut|In|Out)?([\w]+)$/;

let holdMenu;
let holdMenuConditionOriginal;

export const loadAnimationUI = () => {
Blockbench.on('display_animation_frame', displayAnimationFrameCallback);
Blockbench.on('update_keyframe_selection', updateKeyframeSelectionCallback);
Expand All @@ -16,17 +13,11 @@ export const loadAnimationUI = () => {
addMonkeypatch(BarItems.keyframe_interpolation, null, 'condition', () =>
Format.id !== "animated_entity_model" && Original.get(BarItems.keyframe_interpolation).condition()
);

holdMenu = Animation.prototype.menu.structure.find(x => x.name === 'menu.animation.loop')
.children.find(x => x.name === 'menu.animation.loop.hold');
holdMenuConditionOriginal = holdMenu.condition;
holdMenu.condition = () => Format.id !== "animated_entity_model" && holdMenuConditionOriginal();
};

export const unloadAnimationUI = () => {
Blockbench.removeListener('display_animation_frame', displayAnimationFrameCallback);
Blockbench.removeListener('update_keyframe_selection', updateKeyframeSelectionCallback);
holdMenu.condition = holdMenuConditionOriginal;
};

//#region Global Animation UI Handlers
Expand Down
14 changes: 8 additions & 6 deletions src/azurelib_utils/codec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ function onBedrockCompile(e) {

function animatorBuildFile() {
const res = Original.get(Animator).buildFile.apply(this, arguments);
Object.assign(
res,
{
'azurelib_format_version': azurelibSettings.formatVersion,
}
);
if (Format.id === "animated_entity_model") {
Object.assign(
res,
{
'azurelib_format_version': azurelibSettings.formatVersion,
}
);
}
// console.log('animatorBuildFile res:', res);
return res;
}
Expand Down
File renamed without changes.
7 changes: 4 additions & 3 deletions src/azurelib_utils/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "azurelib_utils",
"version": "1.0.2",
"version": "1.0.3",
"private": true,
"description": "AzureLib Utils",
"main": "index.js",
"scripts": {
"build": "webpack && node scripts/updateManifest.js",
"build": "webpack",
"start": "webpack --watch --mode=development",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
Expand All @@ -19,8 +19,9 @@
"author": "AzureDoom, Eliot Lash, Gecko, McHorse",
"icon": "azureicon.png",
"description": "Create animated blocks, items, entity, and armor using the AzureLib library and plugin. This is a fork of Geckolib and cross compatibility will not be promised in the future.",
"min_version": "4.0.0",
"min_version": "4.8.0",
"max_version": "5.0.0",
"new_repository_format": "true",
"variant": "both",
"creation_date": "2023-04-04"
},
Expand Down
19 changes: 0 additions & 19 deletions src/azurelib_utils/scripts/updateManifest.js

This file was deleted.

Loading