|
1 | | -import * as aj from '../animatedJava' |
| 1 | +import type * as aj from '../animatedJava' |
2 | 2 |
|
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' |
5 | 5 | import { 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' |
10 | 6 | import { store } from '../util/store' |
11 | | -import { tl } from '../util/intl' |
12 | | -import { generateTree } from '../util/treeGen' |
| 7 | +import { roundToN } from '../util/misc' |
13 | 8 | import { 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' |
15 | 13 | import { Entities } from '../util/minecraft/entities' |
| 14 | +import { SNBT, SNBTTag, SNBTTagType } from '../util/SNBT' |
| 15 | +import { safeFunctionName, format, fixIndent } from '../util/replace' |
16 | 16 |
|
17 | | -interface animationExporterSettings { |
| 17 | +interface vanillaAnimationExporterSettings { |
18 | 18 | allBonesTag: string |
19 | 19 | animatingFlagScoreboardObjective: string |
20 | 20 | animationLoopModeScoreboardObjective: string |
@@ -88,7 +88,7 @@ async function createMCFile( |
88 | 88 | variantTouchedModels: aj.variantTouchedModels |
89 | 89 | ): Promise<{ mcFile: string; mcbConfig: MCBConfig }> { |
90 | 90 | const ajSettings = settings.animatedJava |
91 | | - const exporterSettings: animationExporterSettings = |
| 91 | + const exporterSettings: vanillaAnimationExporterSettings = |
92 | 92 | settings.vanillaAnimationExporter |
93 | 93 | const projectName = safeFunctionName(ajSettings.projectName) |
94 | 94 |
|
@@ -1044,7 +1044,7 @@ async function createMCFile( |
1044 | 1044 | async function exportMCFile( |
1045 | 1045 | generated: { mcFile: string; mcbConfig: MCBConfig }, |
1046 | 1046 | ajSettings: aj.GlobalSettings, |
1047 | | - exporterSettings: animationExporterSettings |
| 1047 | + exporterSettings: vanillaAnimationExporterSettings |
1048 | 1048 | ) { |
1049 | 1049 | if (!exporterSettings.mcbFilePath) { |
1050 | 1050 | throw new CustomError( |
@@ -1077,7 +1077,7 @@ async function exportMCFile( |
1077 | 1077 | async function exportDataPack( |
1078 | 1078 | generated: { mcFile: string; mcbConfig: MCBConfig }, |
1079 | 1079 | ajSettings: aj.GlobalSettings, |
1080 | | - exporterSettings: animationExporterSettings |
| 1080 | + exporterSettings: vanillaAnimationExporterSettings |
1081 | 1081 | ) { |
1082 | 1082 | if (!exporterSettings.dataPackPath) { |
1083 | 1083 | console.log(exporterSettings.dataPackPath) |
@@ -1212,7 +1212,7 @@ async function exportDataPack( |
1212 | 1212 | } |
1213 | 1213 |
|
1214 | 1214 | async function animationExport(data: any) { |
1215 | | - const exporterSettings: animationExporterSettings = |
| 1215 | + const exporterSettings: vanillaAnimationExporterSettings = |
1216 | 1216 | data.settings.vanillaAnimationExporter |
1217 | 1217 | const generated = await createMCFile( |
1218 | 1218 | data.bones, |
@@ -1268,8 +1268,8 @@ function validateFormattedStringSetting(required: string[]) { |
1268 | 1268 |
|
1269 | 1269 | const Exporter = (AJ: any) => { |
1270 | 1270 | 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 |
1273 | 1273 | { |
1274 | 1274 | rootEntityType: { |
1275 | 1275 | title: tl( |
|
0 commit comments