Skip to content

[BUG] When exporting with Use Storage for Animation, the scoreboard required for animation is not generated. #341

Closed
@Chuzume

Description

@Chuzume

Describe the bug
As the issue name suggests. If you enable this setting when exporting a blueprint, the scoreboard will not be generated and the animation will not play.

This happens regardless of the version you export to.

As a workaround, turn off Use Storage for Animation once, export, reload in Minecraft, and then turn the setting on again before exporting, and the scoreboard will remain.

To Reproduce
Enable Use Storage for Animation in the Blueprint settings and export it. Then check that there is a scoreboard for aj.animation_model_(MODEL_NAME).frame.

Error Message
None

Desktop (please complete the following information):

  • OS: Windows10
  • Version: Animated Java 1.5.2

Additional context

function on_load {
IF (use_storage_for_animation) {
REPEAT (animations) as animation {
data remove storage aj.<%export_namespace%>:animations <%animation.storageSafeName%>
}
<%animationStorage.join('\n')%>
} ELSE {
<%%
animations.forEach(animation => {
emit(`scoreboard objectives add ${OBJECTIVES.FRAME(animation.safe_name)} dummy`)
})
%%>
}
}

The behavior of not generating a scoreboard seems to be intentional, as far as I can tell from the source code. In this case, is it a bug that it doesn't work without a scoreboard?

Metadata

Metadata

Assignees

Labels

🐛 BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions