getGoal

fun <M : Mob> M.getGoal(key: GoalKey<M>): Collection<Goal<M>>

Retrieves all goals from this mob with the specified GoalKey.

Return

a collection of goals matching the key

Parameters

key

the key of the goals to retrieve


inline fun <M : Mob> M.getGoal(key: NamespacedKey): Collection<Goal<M>>

Retrieves all goals from this mob with the specified NamespacedKey.

Return

a collection of goals matching the key

Parameters

key

the namespaced key of the goals to retrieve