File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
engine/src/main/java/org/terasology/logic/behavior Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1717
1818import org .terasology .entitySystem .Component ;
1919import org .terasology .logic .behavior .asset .BehaviorTree ;
20+ import org .terasology .module .sandbox .API ;
2021
2122/**
2223 * Entities with this component are handled by a behavior tree. Default tree to fetch may be set.
2324 *
2425 * @author synopia
2526 */
27+ @ API
2628public class BehaviorComponent implements Component {
2729 public BehaviorTree tree ;
2830}
Original file line number Diff line number Diff line change 1616package org .terasology .logic .behavior ;
1717
1818import org .terasology .entitySystem .Component ;
19+ import org .terasology .module .sandbox .API ;
1920import org .terasology .rendering .nui .Color ;
2021
2122/**
2223 * Defines a renderable node used to display behavior trees.
2324 *
2425 * @author synopia
2526 */
27+ @ API
2628public class BehaviorNodeComponent implements Component {
2729 public static final BehaviorNodeComponent DEFAULT = new BehaviorNodeComponent ();
2830
Original file line number Diff line number Diff line change 2121import org .terasology .logic .behavior .BehaviorNodeFactory ;
2222import org .terasology .logic .behavior .nui .RenderableNode ;
2323import org .terasology .logic .behavior .tree .Node ;
24+ import org .terasology .module .sandbox .API ;
2425
2526import java .util .List ;
2627
3233 *
3334 * @author synopia
3435 */
36+ @ API
3537public class BehaviorTree extends Asset <BehaviorTreeData > {
3638 private BehaviorTreeData data ;
3739
Original file line number Diff line number Diff line change @@ -71,8 +71,10 @@ public void onInitialize() {
7171 if (getNode ().loop != null ) {
7272 skeletalMesh .animationPool .clear ();
7373 List <?> animationListToLoop = (List <?>) actor ().getComponentField (getNode ().loop );
74- for (Object object : animationListToLoop ) {
75- skeletalMesh .animationPool .add ((MeshAnimation ) object );
74+ if (animationListToLoop != null ) {
75+ for (Object object : animationListToLoop ) {
76+ skeletalMesh .animationPool .add ((MeshAnimation ) object );
77+ }
7678 }
7779 }
7880 skeletalMesh .loop = true ;
You can’t perform that action at this time.
0 commit comments