Skip to content

Commit ba6ffda

Browse files
committed
Merge branch 'experimental'
2 parents 9ca1262 + 31ab482 commit ba6ffda

25 files changed

+916
-303
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<h1 align="center">
55
Animated Java
66
<br>
7-
<a href="https://discord.gg/jFgY4PXZfp">
7+
<a href="https://animated-java.dev/discord">
88
<img src="https://img.shields.io/discord/785339959518953482?color=5865f2&label=Discord&style=flat" alt="Discord" />
99
</a>
1010
<a>

exporters/datapackExporter/datapackExporter.ts

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ export function loadExporter() {
4242
'animated_java.datapack_exporter.settings.interpolation_duration.description'
4343
).split('\n'),
4444
},
45-
outdated_rig_warning: {
46-
name: API.translate('animated_java.datapack_exporter.settings.outdated_rig_warning'),
45+
enable_outdated_rig_warning: {
46+
name: API.translate(
47+
'animated_java.datapack_exporter.settings.enable_outdated_rig_warning'
48+
),
4749
description: API.translate(
48-
'animated_java.datapack_exporter.settings.outdated_rig_warning.description'
50+
'animated_java.datapack_exporter.settings.enable_outdated_rig_warning.description'
4951
).split('\n'),
5052
},
5153
include_convenience_functions: {
@@ -56,6 +58,14 @@ export function loadExporter() {
5658
'animated_java.datapack_exporter.settings.include_convenience_functions.description'
5759
).split('\n'),
5860
},
61+
// enable_single_rig_optimizations: {
62+
// name: API.translate(
63+
// 'animated_java.datapack_exporter.settings.enable_single_rig_optimizations'
64+
// ),
65+
// description: API.translate(
66+
// 'animated_java.datapack_exporter.settings.enable_single_rig_optimizations.description'
67+
// ).split('\n'),
68+
// },
5969
root_entity_nbt: {
6070
name: API.translate('animated_java.datapack_exporter.settings.root_entity_nbt'),
6171
description: API.translate(
@@ -87,25 +97,17 @@ export function loadExporter() {
8797
)
8898
}
8999

90-
const _export: (typeof API.Exporter)['prototype']['export'] = async (
91-
ajSettings,
92-
projectSettings,
93-
exporterSettings,
94-
renderedAnimations,
95-
rig
96-
) => {
100+
const _export: (typeof API.Exporter)['prototype']['export'] = async exportData => {
97101
if (!Project?.animated_java_variants) throw new Error('No variants found')
98-
console.log('Animated Java Settings', ajSettings)
99-
console.log('Project Settings', projectSettings)
100-
console.log('Exporter Settings', exporterSettings)
101-
console.log('Rendered Animations', renderedAnimations)
102-
console.log('Rig', rig)
102+
console.log('Export Options', exportData)
103103

104104
console.log('Beginning export process...')
105105

106106
//--------------------------------------------
107-
// ANCHOR Settings
107+
// ANCHOR Settings and Export Options
108108
//--------------------------------------------
109+
const { ajSettings, projectSettings, exporterSettings, renderedAnimations, rig } =
110+
exportData
109111
const NAMESPACE = projectSettings.project_namespace.value
110112
const RIG_ITEM = projectSettings.rig_item.value
111113
const EXPORT_FOLDER = PathModule.parse(exporterSettings.datapack_mcmeta.value).dir
@@ -1070,8 +1072,8 @@ export function loadExporter() {
10701072
}),
10711073
outdated_rig_warning: new API.Settings.CheckboxSetting({
10721074
id: 'animated_java:datapack_exporter/outdated_rig_warning',
1073-
displayName: TRANSLATIONS.outdated_rig_warning.name,
1074-
description: TRANSLATIONS.outdated_rig_warning.description,
1075+
displayName: TRANSLATIONS.enable_outdated_rig_warning.name,
1076+
description: TRANSLATIONS.enable_outdated_rig_warning.description,
10751077
defaultValue: true,
10761078
}),
10771079
include_convenience_functions: new API.Settings.CheckboxSetting({
@@ -1080,6 +1082,12 @@ export function loadExporter() {
10801082
description: TRANSLATIONS.include_convenience_functions.description,
10811083
defaultValue: true,
10821084
}),
1085+
// enable_single_rig_optimizations: new API.Settings.CheckboxSetting({
1086+
// id: 'animated_java:datapack_exporter/enable_single_rig_optimizations',
1087+
// displayName: TRANSLATIONS.enable_single_rig_optimizations.name,
1088+
// description: TRANSLATIONS.enable_single_rig_optimizations.description,
1089+
// defaultValue: false,
1090+
// }),
10831091
root_entity_nbt: new API.Settings.CodeboxSetting(
10841092
{
10851093
id: 'animated_java:datapack_exporter/root_entity_nbt',
@@ -1115,6 +1123,10 @@ export function loadExporter() {
11151123
type: 'setting',
11161124
settingId: 'animated_java:datapack_exporter/include_convenience_functions',
11171125
},
1126+
// {
1127+
// type: 'setting',
1128+
// settingId: 'animated_java:datapack_exporter/enable_single_rig_optimizations',
1129+
// },
11181130
{
11191131
type: 'setting',
11201132
settingId: 'animated_java:datapack_exporter/root_entity_nbt',

exporters/datapackExporter/lang/en.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ animated_java.datapack_exporter.settings.interpolation_duration.description: |-
1616
Setting this higher than 1 will cause the animation to be smoother, but lose precision.
1717
Setting this to 0 will disable interpolation.
1818
19-
animated_java.datapack_exporter.settings.outdated_rig_warning: Outdated Rig Warning
20-
animated_java.datapack_exporter.settings.outdated_rig_warning.description: |-
19+
animated_java.datapack_exporter.settings.enable_outdated_rig_warning: Enable Outdated Rig Warning
20+
animated_java.datapack_exporter.settings.enable_outdated_rig_warning.description: |-
2121
Whether to show a warning in-game when a Rig is found that was summoned before the most recent export.
2222
23+
# animated_java.datapack_exporter.settings.enable_single_rig_optimizations: Enable Single Rig Optimizations
24+
# animated_java.datapack_exporter.settings.enable_single_rig_optimizations.description: |-
25+
# Whether to enable optimizations that are only possible when there is only one Rig in the world at a time.
26+
# These optimizations will reduce the performance impact of the generated Data Pack, but will prevent you from having multiple Rigs in the world at once.
27+
2328
animated_java.datapack_exporter.settings.include_convenience_functions: Include Convenience Functions
2429
animated_java.datapack_exporter.settings.include_convenience_functions.description: |-
2530
Whether to include convenience functions in the generated Data Pack.

exporters/rawExporter/rawExporter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ export function loadExporter() {
2828
settingId: 'animated_java:raw_exporter/foo',
2929
},
3030
],
31-
async export(ajSettings, projectSettings, exporterSettings) {
32-
console.log(ajSettings, projectSettings, exporterSettings)
31+
async export(exportOptions) {
32+
console.log('Export Options:', exportOptions)
33+
const { ajSettings, projectSettings, exporterSettings } = exportOptions
3334
// Temporary placeholder to hide "no await" warning
3435
await new Promise(resolve => setTimeout(resolve, 100))
3536
},

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"type": "module",
33
"name": "animated_java",
44
"title": "Animated Java",
5-
"version": "0.3.5",
6-
"min_blockbench_version": "4.2.0",
5+
"version": "0.3.6",
6+
"min_blockbench_version": "4.6.5",
77
"author": {
88
"name": "Titus Evans (SnaveSutit)",
99
"email": "snavesutit@gmail.com",
@@ -96,6 +96,8 @@
9696
},
9797
"dependencies": {
9898
"deepslate": "^0.17.2",
99+
"marked": "^4.3.0",
100+
"marked-gfm-heading-id": "^3.0.0",
99101
"svelte-ace": "^1.0.21"
100102
}
101103
}

0 commit comments

Comments
 (0)