Skip to content

Commit a4c6bac

Browse files
committed
added previous fix to positional deduping
1 parent b4eb26d commit a4c6bac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

debug_resourcepack/armor_stand.ajmodel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"meta": {
33
"format_version": "0.0",
4-
"creation_time": 1643566986,
4+
"creation_time": 1643569055,
55
"model_format": "animated_java/ajmodel",
66
"box_uv": false,
77
"settings": {
@@ -33,11 +33,11 @@
3333
"vanillaAnimationExporter": {
3434
"rootEntityType": "minecraft:marker",
3535
"rootEntityNbt": "{}",
36-
"markerArmorStands": false,
36+
"markerArmorStands": true,
3737
"autoDistance": true,
3838
"autoDistanceMovementThreshold": 1,
3939
"manualDistance": 10,
40-
"deduplicatePositionFrames": false,
40+
"deduplicatePositionFrames": true,
4141
"deduplicateRotationFrames": true,
4242
"modelTag": "aj.%projectName",
4343
"rootTag": "aj.%projectName.root",

src/exporters/animationExporter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,10 @@ async function createMCFile(
983983
}
984984
case 'leaf':
985985
const pos = getPos(boneName, item)
986+
const nextFrame = getFrame(boneName, item.index+1)
986987
if (isEqualVector(pos, lastPos)) {
988+
// Ignore deduplication if next frame is different value
989+
if (nextFrame && isEqualVector(pos, nextFrame.pos))
987990
return { v: '', trimmed: true }
988991
}
989992
lastPos = pos

0 commit comments

Comments
 (0)