Skip to content

Commit

Permalink
Merge pull request #602 from Gaming32/master
Browse files Browse the repository at this point in the history
Move "Animation to JsonEA Converter" to "Animation to JSON Converter"
  • Loading branch information
JannisX11 authored Sep 20, 2024
2 parents 69d8f2e + 91ba2b8 commit 3cf41fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -875,14 +875,14 @@
"min_version": "4.6.0",
"variant": "both"
},
"animation_to_jsonea": {
"title": "Animation to JsonEA Converter",
"animation_to_json": {
"title": "Animation to JSON Converter",
"author": "Gaming32",
"description": "Converts Blockbench animations to the json format for the Json Entity Animation mod",
"description": "Converts Blockbench animations to the JSON format for the NeoForge mod loader",
"icon": "fa-cube",
"tags": ["Animation", "Minecraft: Java Edition"],
"variant": "both",
"version": "1.0.0"
"version": "1.0.1"
},
"azurelib_utils": {
"title": "AzureLib Animator",
Expand Down
18 changes: 9 additions & 9 deletions plugins/animation_to_jsonea.js → plugins/animation_to_json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
(function () {
var menuButton;

Plugin.register("animation_to_jsonea", {
title: "Animation to JsonEA Converter",
Plugin.register("animation_to_json", {
title: "Animation to JSON Converter",
author: "Gaming32",
description: "Converts Blockbench animations to the json format for the Json Entity Animation mod",
description: "Converts Blockbench animations to the JSON format for the NeoForge mod loader",
icon: "fa-cube",
tags: ["Animation", "Minecraft: Java Edition"],
variant: "both",
version: "1.0.0",
version: "1.0.1",
onload() {
Formats.modded_entity.animation_mode = true;
menuButton = new Action("export_animation_to_jsonea", {
name: "Export Animations to JsonEA",
description: "Export Animations to Json Entity Animation format",
menuButton = new Action("export_animation_to_json", {
name: "Export Animations to JSON",
description: "Export Animations to JSON format",
icon: "fa-file-export",
condition: () => Format.animation_mode,
click() {
Expand All @@ -24,7 +24,7 @@
type: "Json Files",
extensions: ["json"],
name: `${animation.name.replaceAll(".", "_").replace("animation_", "")}.json`,
resource_id: "jsonea",
resource_id: "json_entity_animation",
savetype: "text",
content: JSON.stringify(generateJson(animation))
});
Expand All @@ -36,7 +36,7 @@
menuButton.delete();
}
});

function generateJson(animation) {
const result = {
length: animation.length,
Expand Down

0 comments on commit 3cf41fb

Please sign in to comment.