1- import * as aj from '../animatedJava'
1+ import type * as aj from '../animatedJava'
22
3- import { CustomError } from '../util/customError '
4- import { JsonText } from '../util/minecraft/jsonText '
3+ import * as fs from 'fs '
4+ import { tl } from '../util/intl '
55import { Path } from '../util/path'
6- import { removeKeyGently } from '../util/misc'
7- import { roundToN } from '../util/misc'
8- import { safeFunctionName , format , fixIndent } from '../util/replace'
9- import { SNBT , SNBTTag , SNBTTagType } from '../util/SNBT'
106import { store } from '../util/store'
11- import { tl } from '../util/intl'
12- import { generateTree } from '../util/treeGen'
7+ import { roundToN } from '../util/misc'
138import { compileMC } from '../compileLangMC'
14- import * as fs from 'fs'
9+ import { removeKeyGently } from '../util/misc'
10+ import { generateTree } from '../util/treeGen'
11+ import { CustomError } from '../util/customError'
12+ import { JsonText } from '../util/minecraft/jsonText'
1513import { Entities } from '../util/minecraft/entities'
14+ import { SNBT , SNBTTag , SNBTTagType } from '../util/SNBT'
15+ import { safeFunctionName , format , fixIndent } from '../util/replace'
1616
17- interface animationExporterSettings {
17+ interface vanillaAnimationExporterSettings {
1818 allBonesTag : string
1919 animatingFlagScoreboardObjective : string
2020 animationLoopModeScoreboardObjective : string
@@ -88,7 +88,7 @@ async function createMCFile(
8888 variantTouchedModels : aj . variantTouchedModels
8989) : Promise < { mcFile : string ; mcbConfig : MCBConfig } > {
9090 const ajSettings = settings . animatedJava
91- const exporterSettings : animationExporterSettings =
91+ const exporterSettings : vanillaAnimationExporterSettings =
9292 settings . vanillaAnimationExporter
9393 const projectName = safeFunctionName ( ajSettings . projectName )
9494
@@ -762,13 +762,13 @@ async function createMCFile(
762762 throw new CustomError ( 'No Animations Error' , {
763763 intentional : true ,
764764 dialog : {
765- id : 'animatedJava.exporters.animation .dialogs.errors.noAnimations' ,
765+ id : 'animatedJava.exporters.vanillaAnimation .dialogs.errors.noAnimations' ,
766766 title : tl (
767- 'animatedJava.exporters.animation .dialogs.errors.noAnimations.title'
767+ 'animatedJava.exporters.vanillaAnimation .dialogs.errors.noAnimations.title'
768768 ) ,
769769 lines : [
770770 tl (
771- 'animatedJava.exporters.animation .dialogs.errors.noAnimations.body'
771+ 'animatedJava.exporters.vanillaAnimation .dialogs.errors.noAnimations.body'
772772 ) ,
773773 ] ,
774774 width : 512 + 128 ,
@@ -785,13 +785,13 @@ async function createMCFile(
785785 throw new CustomError ( 'Zero Length Animation Error' , {
786786 intentional : true ,
787787 dialog : {
788- id : 'animatedJava.exporters.animation .dialogs.errors.zeroLengthAnimation' ,
788+ id : 'animatedJava.exporters.vanillaAnimation .dialogs.errors.zeroLengthAnimation' ,
789789 title : tl (
790- 'animatedJava.exporters.animation .dialogs.errors.zeroLengthAnimation.title'
790+ 'animatedJava.exporters.vanillaAnimation .dialogs.errors.zeroLengthAnimation.title'
791791 ) ,
792792 lines : [
793793 tl (
794- 'animatedJava.exporters.animation .dialogs.errors.zeroLengthAnimation.body' ,
794+ 'animatedJava.exporters.vanillaAnimation .dialogs.errors.zeroLengthAnimation.body' ,
795795 {
796796 animationName : animation . name ,
797797 }
@@ -1044,7 +1044,7 @@ async function createMCFile(
10441044async function exportMCFile (
10451045 generated : { mcFile : string ; mcbConfig : MCBConfig } ,
10461046 ajSettings : aj . GlobalSettings ,
1047- exporterSettings : animationExporterSettings
1047+ exporterSettings : vanillaAnimationExporterSettings
10481048) {
10491049 if ( ! exporterSettings . mcbFilePath ) {
10501050 throw new CustomError (
@@ -1077,7 +1077,7 @@ async function exportMCFile(
10771077async function exportDataPack (
10781078 generated : { mcFile : string ; mcbConfig : MCBConfig } ,
10791079 ajSettings : aj . GlobalSettings ,
1080- exporterSettings : animationExporterSettings
1080+ exporterSettings : vanillaAnimationExporterSettings
10811081) {
10821082 if ( ! exporterSettings . dataPackPath ) {
10831083 console . log ( exporterSettings . dataPackPath )
@@ -1212,7 +1212,7 @@ async function exportDataPack(
12121212}
12131213
12141214async function animationExport ( data : any ) {
1215- const exporterSettings : animationExporterSettings =
1215+ const exporterSettings : vanillaAnimationExporterSettings =
12161216 data . settings . vanillaAnimationExporter
12171217 const generated = await createMCFile (
12181218 data . bones ,
@@ -1268,8 +1268,8 @@ function validateFormattedStringSetting(required: string[]) {
12681268
12691269const Exporter = ( AJ : any ) => {
12701270 AJ . settings . registerPluginSettings (
1271- 'animatedJava.exporters.animation ' , // Plugin ID
1272- 'vanillaAnimationExporter' , // Plugin Settings Key
1271+ 'animatedJava.exporters.vanillaAnimation ' , // Exporter ID
1272+ 'vanillaAnimationExporter' , // Exporter Settings Key
12731273 {
12741274 rootEntityType : {
12751275 title : tl (
@@ -1337,10 +1337,10 @@ const Exporter = (AJ: any) => {
13371337 } ,
13381338 autoDistance : {
13391339 title : tl (
1340- 'animatedJava.exporters.animation .settings.autoDistance.title'
1340+ 'animatedJava.exporters.vanillaAnimation .settings.autoDistance.title'
13411341 ) ,
13421342 description : tl (
1343- 'animatedJava.exporters.animation .settings.autoDistance.description'
1343+ 'animatedJava.exporters.vanillaAnimation .settings.autoDistance.description'
13441344 ) ,
13451345 type : 'checkbox' ,
13461346 default : true ,
@@ -1350,10 +1350,10 @@ const Exporter = (AJ: any) => {
13501350 } ,
13511351 autoDistanceMovementThreshold : {
13521352 title : tl (
1353- 'animatedJava.exporters.animation .settings.autoDistanceMovementThreshold.title'
1353+ 'animatedJava.exporters.vanillaAnimation .settings.autoDistanceMovementThreshold.title'
13541354 ) ,
13551355 description : tl (
1356- 'animatedJava.exporters.animation .settings.autoDistanceMovementThreshold.description'
1356+ 'animatedJava.exporters.vanillaAnimation .settings.autoDistanceMovementThreshold.description'
13571357 ) ,
13581358 type : 'number' ,
13591359 default : 1 ,
@@ -1376,10 +1376,10 @@ const Exporter = (AJ: any) => {
13761376 } ,
13771377 manualDistance : {
13781378 title : tl (
1379- 'animatedJava.exporters.animation .settings.manualDistance.title'
1379+ 'animatedJava.exporters.vanillaAnimation .settings.manualDistance.title'
13801380 ) ,
13811381 description : tl (
1382- 'animatedJava.exporters.animation .settings.manualDistance.description'
1382+ 'animatedJava.exporters.vanillaAnimation .settings.manualDistance.description'
13831383 ) ,
13841384 type : 'number' ,
13851385 default : 10 ,
@@ -1493,32 +1493,32 @@ const Exporter = (AJ: any) => {
14931493 } ,
14941494 frameScoreboardObjective : {
14951495 title : tl (
1496- 'animatedJava.exporters.animation .settings.frameScoreboardObjective.title'
1496+ 'animatedJava.exporters.vanillaAnimation .settings.frameScoreboardObjective.title'
14971497 ) ,
14981498 description : tl (
1499- 'animatedJava.exporters.animation .settings.frameScoreboardObjective.description'
1499+ 'animatedJava.exporters.vanillaAnimation .settings.frameScoreboardObjective.description'
15001500 ) ,
15011501 type : 'text' ,
15021502 default : 'aj.frame' ,
15031503 onUpdate : validateFormattedStringSetting ( [ ] ) ,
15041504 } ,
15051505 animatingFlagScoreboardObjective : {
15061506 title : tl (
1507- 'animatedJava.exporters.animation .settings.animatingFlagScoreboardObjective.title'
1507+ 'animatedJava.exporters.vanillaAnimation .settings.animatingFlagScoreboardObjective.title'
15081508 ) ,
15091509 description : tl (
1510- 'animatedJava.exporters.animation .settings.animatingFlagScoreboardObjective.description'
1510+ 'animatedJava.exporters.vanillaAnimation .settings.animatingFlagScoreboardObjective.description'
15111511 ) ,
15121512 type : 'text' ,
15131513 default : 'aj.%projectName.animating' ,
15141514 onUpdate : validateFormattedStringSetting ( [ '%projectName' ] ) ,
15151515 } ,
15161516 animationLoopModeScoreboardObjective : {
15171517 title : tl (
1518- 'animatedJava.exporters.animation .settings.animationLoopModeScoreboardObjective.title'
1518+ 'animatedJava.exporters.vanillaAnimation .settings.animationLoopModeScoreboardObjective.title'
15191519 ) ,
15201520 description : tl (
1521- 'animatedJava.exporters.animation .settings.animationLoopModeScoreboardObjective.description'
1521+ 'animatedJava.exporters.vanillaAnimation .settings.animationLoopModeScoreboardObjective.description'
15221522 ) ,
15231523 type : 'text' ,
15241524 default : 'aj.%projectName.%animationName.loopMode' ,
0 commit comments