Skip to content

Commit 8162c4d

Browse files
committed
🚧 Fix JSON Export missing head_rot data.
1 parent 936fae5 commit 8162c4d

File tree

4 files changed

+174
-409
lines changed

4 files changed

+174
-409
lines changed

src/systems/jsonCompiler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ function serailizeAnimationNode(node: IAnimationNode): ExportedAnimationNode {
209209
},
210210
pos: node.pos,
211211
rot: node.rot,
212+
head_rot: node.head_rot,
212213
scale: node.scale,
213214
interpolation: node.interpolation,
214215
commands: node.commands,

test_blueprints/armor_stand.ajblueprint

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -966,17 +966,6 @@
966966
"uuid": "a2ebcf74-9f58-df75-9b42-f565d9d6e42c",
967967
"type": "locator"
968968
},
969-
{
970-
"name": "camera",
971-
"path": "",
972-
"position": [0, 40, 0],
973-
"rotation": [0, 0, 0],
974-
"linked_preview": "",
975-
"camera_linked": false,
976-
"visibility": true,
977-
"type": "camera",
978-
"uuid": "d0076177-a6cf-561c-08d8-efd07677b337"
979-
},
980969
{
981970
"name": "text",
982971
"position": [0, 39, 0],
@@ -993,6 +982,17 @@
993982
"align": "left",
994983
"uuid": "a8257e87-1780-81b6-b0e4-c420fa229a69",
995984
"type": "animated_java:text_display"
985+
},
986+
{
987+
"name": "camera",
988+
"path": "",
989+
"position": [0, 52, 0],
990+
"rotation": [0, 0, 0],
991+
"linked_preview": "",
992+
"camera_linked": false,
993+
"visibility": true,
994+
"type": "camera",
995+
"uuid": "d0076177-a6cf-561c-08d8-efd07677b337"
996996
}
997997
],
998998
"outliner": [
@@ -4120,7 +4120,7 @@
41204120
"override": false,
41214121
"length": 2,
41224122
"snapping": 20,
4123-
"selected": true,
4123+
"selected": false,
41244124
"saved": false,
41254125
"path": "",
41264126
"anim_time_update": "",

test_blueprints/blockstates.ajblueprint

Lines changed: 24 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"save_location": "D:\\github-repos\\animated-java\\animated-java\\test_blueprints\\blockstates.ajblueprint",
77
"last_used_export_namespace": "blueprint"
88
},
9-
"project_settings": {
9+
"blueprint_settings": {
1010
"export_namespace": "blueprint",
1111
"show_bounding_box": false,
1212
"auto_bounding_box": true,
1313
"bounding_box": [48, 48],
1414
"enable_plugin_mode": false,
15-
"enable_resource_pack": true,
16-
"enable_data_pack": true,
15+
"resource_pack_export_mode": "raw",
16+
"data_pack_export_mode": "raw",
1717
"display_item": "minecraft:white_dye",
18-
"customModelDataOffset": 0,
18+
"custom_model_data_offset": 0,
1919
"enable_advanced_resource_pack_settings": false,
2020
"resource_pack": "",
2121
"display_item_path": "",
@@ -26,7 +26,9 @@
2626
"summon_commands": "",
2727
"interpolation_duration": 1,
2828
"teleportation_duration": 1,
29-
"use_storage_for_animation": false
29+
"use_storage_for_animation": false,
30+
"baked_animations": true,
31+
"json_file": ""
3032
},
3133
"resolution": {
3234
"width": 16,
@@ -35,7 +37,7 @@
3537
"elements": [
3638
{
3739
"name": "vanilla_block_display",
38-
"position": [4.5, 8, 0],
40+
"position": [3.5, 0, -8],
3941
"rotation": [0, -90, 0],
4042
"scale": [1, 1, 1],
4143
"visibility": true,
@@ -52,7 +54,7 @@
5254
},
5355
{
5456
"name": "vanilla_block_display2",
55-
"position": [-4.5, 8.05, 0.075],
57+
"position": [-3.5, 0.05, 8.075],
5658
"rotation": [0, 90, 0],
5759
"scale": [1, 1, 1],
5860
"visibility": true,
@@ -69,41 +71,7 @@
6971
},
7072
{
7173
"name": "vanilla_block_display",
72-
"position": [0, 8, -5],
73-
"rotation": [0, 0, 0],
74-
"scale": [1, 0.75, 1],
75-
"visibility": true,
76-
"item": "minecraft:diamond",
77-
"config": {},
78-
"block": "glass_pane[east=true,west=true]",
79-
"text": "\"Hello World!\"",
80-
"lineWidth": 200,
81-
"backgroundColor": "#000000",
82-
"backgroundAlpha": 0.25,
83-
"align": "center",
84-
"uuid": "c0fa5ccd-c87a-32dd-5aa8-24477ad3a904",
85-
"type": "animated_java:vanilla_block_display"
86-
},
87-
{
88-
"name": "vanilla_block_display3",
89-
"position": [0, 8, 5],
90-
"rotation": [0, 0, 0],
91-
"scale": [1, 0.75, 1],
92-
"visibility": true,
93-
"item": "minecraft:diamond",
94-
"config": {},
95-
"block": "glass_pane[east=true,west=true]",
96-
"text": "\"Hello World!\"",
97-
"lineWidth": 200,
98-
"backgroundColor": "#000000",
99-
"backgroundAlpha": 0.25,
100-
"align": "center",
101-
"uuid": "7245da3a-1e38-ba79-85c4-03d6c24522d7",
102-
"type": "animated_java:vanilla_block_display"
103-
},
104-
{
105-
"name": "vanilla_block_display",
106-
"position": [-4, 4, -8],
74+
"position": [-5, 2, -8],
10775
"rotation": [0, 0, 0],
10876
"scale": [0.25, 0.25, 0.25],
10977
"visibility": true,
@@ -120,7 +88,7 @@
12088
},
12189
{
12290
"name": "vanilla_block_display4",
123-
"position": [-4, 8, -8],
91+
"position": [-5, 6, -8],
12492
"rotation": [0, 0, 0],
12593
"scale": [0.25, 0.25, 0.25],
12694
"visibility": true,
@@ -137,7 +105,7 @@
137105
},
138106
{
139107
"name": "vanilla_block_display",
140-
"position": [9, 7, -5],
108+
"position": [6, 1, -7],
141109
"rotation": [0, 0, 0],
142110
"scale": [0.25, 0.75, 0.25],
143111
"visibility": true,
@@ -154,7 +122,7 @@
154122
},
155123
{
156124
"name": "vanilla_block_display5",
157-
"position": [-9, 7, -5],
125+
"position": [-9.75, 2, -7],
158126
"rotation": [0, 0, 0],
159127
"scale": [0.25, 0.75, 0.25],
160128
"visibility": true,
@@ -171,7 +139,7 @@
171139
},
172140
{
173141
"name": "vanilla_block_display6",
174-
"position": [-9, 7, 5],
142+
"position": [-9.75, 2, 3],
175143
"rotation": [0, 0, 0],
176144
"scale": [0.25, 0.75, 0.25],
177145
"visibility": true,
@@ -188,7 +156,7 @@
188156
},
189157
{
190158
"name": "vanilla_block_display7",
191-
"position": [9, 7, 5],
159+
"position": [6, 1, 3],
192160
"rotation": [0, 0, 0],
193161
"scale": [0.25, 0.75, 0.25],
194162
"visibility": true,
@@ -239,7 +207,7 @@
239207
},
240208
{
241209
"name": "vanilla_block_display",
242-
"position": [4, 8, -8],
210+
"position": [1, 6, -4.75],
243211
"rotation": [0, 0, 0],
244212
"scale": [0.25, 0.25, 0.25],
245213
"visibility": true,
@@ -256,7 +224,7 @@
256224
},
257225
{
258226
"name": "vanilla_block_display",
259-
"position": [-7, 18, 3],
227+
"position": [-9, 14, 1],
260228
"rotation": [0, 0, 0],
261229
"scale": [0.25, 0.5, 0.25],
262230
"visibility": true,
@@ -271,26 +239,9 @@
271239
"uuid": "9d2ba671-d9a1-5d55-b841-f1eea4b7dc63",
272240
"type": "animated_java:vanilla_block_display"
273241
},
274-
{
275-
"name": "vanilla_block_display8",
276-
"position": [-7, 22, 3],
277-
"rotation": [0, 0, 0],
278-
"scale": [0.225, 0.225, 0.225],
279-
"visibility": true,
280-
"item": "minecraft:diamond",
281-
"config": {},
282-
"block": "campfire",
283-
"text": "\"Hello World!\"",
284-
"lineWidth": 200,
285-
"backgroundColor": "#000000",
286-
"backgroundAlpha": 0.25,
287-
"align": "center",
288-
"uuid": "62838c4b-3782-a509-f80d-055fa2933300",
289-
"type": "animated_java:vanilla_block_display"
290-
},
291242
{
292243
"name": "vanilla_block_display",
293-
"position": [-7, 24, 3],
244+
"position": [-9, 22, 1],
294245
"rotation": [0, 0, 0],
295246
"scale": [0.25, 0.25, 0.25],
296247
"visibility": true,
@@ -307,7 +258,7 @@
307258
},
308259
{
309260
"name": "vanilla_block_display",
310-
"position": [9, 2, -10],
261+
"position": [6, 3, -11],
311262
"rotation": [0, 0, 0],
312263
"scale": [0.25, 0.25, 0.25],
313264
"visibility": true,
@@ -324,7 +275,7 @@
324275
},
325276
{
326277
"name": "vanilla_block_display9",
327-
"position": [9, 4, -10],
278+
"position": [6, 5, -11],
328279
"rotation": [0, 0, 0],
329280
"scale": [0.25, 0.25, 0.25],
330281
"visibility": true,
@@ -341,7 +292,7 @@
341292
},
342293
{
343294
"name": "vanilla_block_display10",
344-
"position": [-9, 4, -10],
295+
"position": [-9.75, 5, -11],
345296
"rotation": [0, 0, 0],
346297
"scale": [0.25, 0.25, 0.25],
347298
"visibility": true,
@@ -358,7 +309,7 @@
358309
},
359310
{
360311
"name": "vanilla_block_display11",
361-
"position": [-9, 2, -10],
312+
"position": [-9.75, 3, -11],
362313
"rotation": [0, 0, 0],
363314
"scale": [0.25, 0.25, 0.25],
364315
"visibility": true,
@@ -377,8 +328,6 @@
377328
"outliner": [
378329
"5843fce5-a1cd-aa36-0491-1eef0260d24e",
379330
"3ea4a7a2-f0c5-0109-2c93-80bb5fd9feb6",
380-
"c0fa5ccd-c87a-32dd-5aa8-24477ad3a904",
381-
"7245da3a-1e38-ba79-85c4-03d6c24522d7",
382331
"d58e6993-bc81-0cd1-20fa-bd2b11a0525d",
383332
"2744407b-b74b-4797-75c5-a84107d26db2",
384333
"716d5f87-0ac8-e260-4646-5fce28b29a66",
@@ -389,7 +338,6 @@
389338
"93952a66-0e38-4b01-151a-8faa801a914f",
390339
"5db9e364-e7c6-8eee-ec47-027b07408a9a",
391340
"9d2ba671-d9a1-5d55-b841-f1eea4b7dc63",
392-
"62838c4b-3782-a509-f80d-055fa2933300",
393341
"beb4992e-2d95-7ef0-44b6-4efeeebea187",
394342
"dea933e7-4568-aae1-86c4-f761f5d0f2e2",
395343
"42bafea5-d05a-8106-0db4-0d1b0067a68e",
@@ -399,11 +347,11 @@
399347
"textures": [],
400348
"variants": {
401349
"default": {
402-
"display_name": "Default",
403350
"name": "default",
351+
"display_name": "Default",
404352
"uuid": "c79ede10-67d7-8730-033c-de43ab658b53",
405353
"texture_map": {},
406-
"excluded_bones": []
354+
"excluded_nodes": []
407355
},
408356
"list": []
409357
},

0 commit comments

Comments
 (0)