diff --git a/src/main/java/electrosphere/main/core/btree/methods/ClientAttach.java b/src/main/java/electrosphere/main/core/btree/methods/ClientAttach.java index 47aa066..d8f439c 100644 --- a/src/main/java/electrosphere/main/core/btree/methods/ClientAttach.java +++ b/src/main/java/electrosphere/main/core/btree/methods/ClientAttach.java @@ -51,7 +51,7 @@ public class ClientAttach implements VirtualMethod { @Override public boolean shouldOverwrite(){ - return false; + return true; } } diff --git a/src/main/java/electrosphere/main/core/btree/methods/ServerAttach.java b/src/main/java/electrosphere/main/core/btree/methods/ServerAttach.java index 72ead30..23ba5cf 100644 --- a/src/main/java/electrosphere/main/core/btree/methods/ServerAttach.java +++ b/src/main/java/electrosphere/main/core/btree/methods/ServerAttach.java @@ -52,7 +52,7 @@ public class ServerAttach implements VirtualMethod { @Override public boolean shouldOverwrite(){ - return false; + return true; } } diff --git a/src/main/resources/btree/Constructor.java b/src/main/resources/btree/Constructor.java index 039343e..82dc53a 100644 --- a/src/main/resources/btree/Constructor.java +++ b/src/main/resources/btree/Constructor.java @@ -5,7 +5,8 @@ * Constructor *

* @param parent The parent entity of this tree + * @param params Optional parameters that can be provided when attaching the tree. All custom data required for creating this tree should be passed in this varargs. */ -public REPLACE_0_ME(Entity parent){ +public REPLACE_0_ME(Entity parent, Object ... params){ this.parent = parent; } \ No newline at end of file diff --git a/src/main/resources/client/AttachBTree.java b/src/main/resources/client/AttachBTree.java index 95a6eaf..844806d 100644 --- a/src/main/resources/client/AttachBTree.java +++ b/src/main/resources/client/AttachBTree.java @@ -6,12 +6,10 @@ *

* @param entity The entity to attach to * @param tree The behavior tree to attach + * @param params Optional parameters that will be provided to the constructor */ -public static REPLACE_2_ME attachTree(Entity parent){ - REPLACE_2_ME rVal = new REPLACE_2_ME(parent); - //put manual code here (setting params, etc) - - +public static REPLACE_2_ME attachTree(Entity parent, Object ... params){ + REPLACE_2_ME rVal = new REPLACE_2_ME(parent,params); //!!WARNING!! from here below should not be touched //This was generated automatically to properly alert various systems that the btree exists and should be tracked parent.putData(EntityDataStrings.REPLACE_1_ME, rVal); diff --git a/src/main/resources/server/AttachBTree.java b/src/main/resources/server/AttachBTree.java index 985dc13..dfd5a8b 100644 --- a/src/main/resources/server/AttachBTree.java +++ b/src/main/resources/server/AttachBTree.java @@ -6,12 +6,10 @@ *

* @param entity The entity to attach to * @param tree The behavior tree to attach + * @param params Optional parameters that will be provided to the constructor */ -public static REPLACE_2_ME attachTree(Entity parent){ - REPLACE_2_ME rVal = new REPLACE_2_ME(parent); - //put manual code here (setting params, etc) - - +public static REPLACE_2_ME attachTree(Entity parent, Object ... params){ + REPLACE_2_ME rVal = new REPLACE_2_ME(parent,params); //!!WARNING!! from here below should not be touched //This was generated automatically to properly alert various systems that the btree exists and should be tracked ServerBehaviorTreeUtils.attachBTreeToEntity(parent, rVal);