Skip to content

Commit 07f79e3

Browse files
committed
Second half of the settings change
1 parent eca9b95 commit 07f79e3

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

debug_resourcepack/armor_stand.ajmodel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"meta": {
33
"format_version": "0.0",
4-
"creation_time": 1641758303,
4+
"creation_time": 1641766217,
55
"model_format": "animated_java/ajmodel",
66
"box_uv": false,
77
"settings": {
@@ -14,7 +14,7 @@
1414
"predicateFilePath": "C:\\Users\\Snave\\AppData\\Roaming\\.minecraft\\resourcepacks\\Animated Java Testing\\assets\\minecraft\\models\\item\\leather_horse_armor.json",
1515
"transparentTexturePath": "C:\\Users\\Snave\\AppData\\Roaming\\.minecraft\\resourcepacks\\Animated Java Testing\\assets\\minecraft\\textures\\transparent.png"
1616
},
17-
"animatedJava_exporter_statueExporter": {
17+
"vanillaStatueExporter": {
1818
"rootEntityType": "minecraft:marker",
1919
"rootEntityNbt": "{}",
2020
"markerArmorStands": true,
@@ -25,12 +25,12 @@
2525
"individualBoneTag": "aj.%projectName.bone.%boneName",
2626
"internalScoreboardObjective": "aj.i",
2727
"idScoreboardObjective": "aj.id",
28-
"exportMode": "vanilla",
29-
"mcbFilePath": "C:\\Users\\Snave\\AppData\\Roaming\\.minecraft\\saves\\Animated Java Dev\\datapacks\\Animated Java Development\\src\\armor_stand.mc",
28+
"exportMode": "mcb",
29+
"mcbFilePath": "",
3030
"mcbConfigPath": "",
31-
"dataPackPath": "C:\\Users\\Snave\\AppData\\Roaming\\.minecraft\\saves\\Animated Java Dev\\datapacks\\armor_stand"
31+
"dataPackPath": ""
3232
},
33-
"animatedJava_exporter_animationExporter": {
33+
"vanillaAnimationExporter": {
3434
"rootEntityType": "minecraft:marker",
3535
"rootEntityNbt": "{}",
3636
"markerArmorStands": true,
@@ -50,7 +50,7 @@
5050
"exportMode": "mcb",
5151
"mcbFilePath": "C:\\Users\\Snave\\AppData\\Roaming\\.minecraft\\saves\\Animated Java Dev\\datapacks\\Animated Java Development\\src\\armor_stand.mc",
5252
"mcbConfigPath": "",
53-
"dataPackPath": "C:\\Users\\Snave\\AppData\\Roaming\\.minecraft\\saves\\Animated Java Dev\\datapacks\\armor_stand"
53+
"dataPackPath": ""
5454
}
5555
},
5656
"variants": {

src/exporters/animationExporter.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}
@@ -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',

src/lang/en.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,11 @@ animatedJava:
353353
- The path to export the generated Data Pack to.
354354

355355
#? Vanilla Statue Exporter
356-
statue:
356+
vanillaStatue:
357357
title: Statue Exporter
358358

359359
#? Vanilla Animation Exporter
360-
animation:
360+
vanillaAnimation:
361361
title: Animation Exporter
362362
dialogs:
363363
errors:

src/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ class Settings {
524524

525525
registerPluginSettings(exporterId, exporterSettingsKey, settings) {
526526
DefaultSettings[exporterSettingsKey] = settings
527-
ForeignSettingTranslationKeys[exporterSettingsKey] = exporterId
527+
ForeignSettingTranslationKeys[exporterSettingsKey] = `${exporterId}.title`
528528
this.update(
529529
{
530530
[exporterSettingsKey]: settings,

src/ui/dialogs/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { tl } from '../../util/intl'
44
import { ERROR } from '../../util/errors'
55
import events from '../../constants/events'
66
import React, { useEffect, useRef, useState } from 'react'
7-
import { DefaultSettings, settings } from '../../settings'
7+
import { DefaultSettings, settings, ForeignSettingTranslationKeys } from '../../settings'
88

99
const dialog = electron.dialog
1010
let updateSettingsUiActions = {}

0 commit comments

Comments
 (0)