Skip to content

Commit 6a6e36b

Browse files
committed
šŸ› Fix #465 - An animation with loop mode once pauses all animations when finished
1 parent c7fd43a commit 6a6e36b

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

ā€Žsrc/systems/datapackCompiler/1.20.4/animation.mcbā€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ dir animations {
283283
execute \
284284
if score @s <%OBJECTIVES.FRAME(animation.storage_name)%> \
285285
matches <%animation.duration-1%> \
286-
run return run \
287-
function ../stop
286+
run return run block loop_mode_stop {
287+
scoreboard players set @s <%OBJECTIVES.FRAME(animation.storage_name)%> 0
288+
tag @s add <%TAGS.TRANSFORMS_ONLY()%>
289+
execute at @s run function ./zzz/set_frame {frame: 0}
290+
tag @s remove <%TAGS.TRANSFORMS_ONLY()%>
291+
}
288292
}
289293
scoreboard players add @s <%OBJECTIVES.FRAME(animation.storage_name)%> 1
290294
}

ā€Žsrc/systems/datapackCompiler/1.20.5/animation.mcbā€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ dir animations {
283283
execute \
284284
if score @s <%OBJECTIVES.FRAME(animation.storage_name)%> \
285285
matches <%animation.duration-1%> \
286-
run return run \
287-
function ../stop
286+
run return run block loop_mode_stop {
287+
scoreboard players set @s <%OBJECTIVES.FRAME(animation.storage_name)%> 0
288+
tag @s add <%TAGS.TRANSFORMS_ONLY()%>
289+
execute at @s run function ./zzz/set_frame {frame: 0}
290+
tag @s remove <%TAGS.TRANSFORMS_ONLY()%>
291+
}
288292
}
289293
scoreboard players add @s <%OBJECTIVES.FRAME(animation.storage_name)%> 1
290294
}

ā€Žsrc/systems/datapackCompiler/1.21.2/animation.mcbā€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ dir animations {
283283
execute \
284284
if score @s <%OBJECTIVES.FRAME(animation.storage_name)%> \
285285
matches <%animation.duration-1%> \
286-
run return run \
287-
function ../stop
286+
run return run block loop_mode_stop {
287+
scoreboard players set @s <%OBJECTIVES.FRAME(animation.storage_name)%> 0
288+
tag @s add <%TAGS.TRANSFORMS_ONLY()%>
289+
execute at @s run function ./zzz/set_frame {frame: 0}
290+
tag @s remove <%TAGS.TRANSFORMS_ONLY()%>
291+
}
288292
}
289293
scoreboard players add @s <%OBJECTIVES.FRAME(animation.storage_name)%> 1
290294
}

ā€Žsrc/systems/datapackCompiler/1.21.4/animation.mcbā€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ dir animations {
283283
execute \
284284
if score @s <%OBJECTIVES.FRAME(animation.storage_name)%> \
285285
matches <%animation.duration-1%> \
286-
run return run \
287-
function ../stop
286+
run return run block loop_mode_stop {
287+
scoreboard players set @s <%OBJECTIVES.FRAME(animation.storage_name)%> 0
288+
tag @s add <%TAGS.TRANSFORMS_ONLY()%>
289+
execute at @s run function ./zzz/set_frame {frame: 0}
290+
tag @s remove <%TAGS.TRANSFORMS_ONLY()%>
291+
}
288292
}
289293
scoreboard players add @s <%OBJECTIVES.FRAME(animation.storage_name)%> 1
290294
}

0 commit comments

Comments
Ā (0)