Skip to content

Commit

Permalink
added namespace to beh entity animations in the description
Browse files Browse the repository at this point in the history
  • Loading branch information
12rcu committed Aug 28, 2024
1 parent db934ce commit 4c17276
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ open class BehaviourEntity(val entityData: Entity.Data) : OverwriteComponents(en
*/
open fun animation(name: String, settings: BehAnimation.() -> Unit) {
unsafeRawAnimations.animation("animation.${entityData.addon.config.namespace}.${entityData.name}.$name", settings)
addSharedAnimation("animation.${entityData.name}.$name", name)
addSharedAnimation("animation.${entityData.addon.config.namespace}.${entityData.name}.$name", name)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,27 @@ class AnimControllerTest {
}
}
}
withJsonFile(config.paths.behEntity.resolve("my_anim_test.json")) {
assert(
containsKeyChainValue(
value = "query.is_baby",
"minecraft:entity",
"description",
"scripts",
"animate",
"my_anim_controller"
)
)
assert(
containsKeyChainValue(
value = "controller.animation.${config.namespace}.my_anim_test.my_anim_controller",
"minecraft:entity",
"description",
"animations",
"my_anim_controller"
)
)
}
withJsonFile(config.paths.behAnimController.resolve("my_anim_test.json")) {
assert(
containsKeyChain(
Expand Down

0 comments on commit 4c17276

Please sign in to comment.