Fix idle tree on server

This commit is contained in:
austin 2023-12-05 22:08:14 -05:00
parent b2a7b8e93e
commit 08cd0ec53b

View File

@ -669,7 +669,9 @@ public class CreatureUtils {
rVal.putData(EntityDataStrings.LIFE_STATE, new LifeState(rVal, rawType.getHealthSystem()));
ServerEntityTagUtils.attachTagToEntity(rVal, EntityTags.LIFE_STATE);
//idle tree & generic stuff all creatures have
rVal.putData(EntityDataStrings.IDLE_TREE, new IdleTree(rVal));
IdleTree idleTree = new IdleTree(rVal);
rVal.putData(EntityDataStrings.IDLE_TREE, idleTree);
ServerBehaviorTreeUtils.attachBTreeToEntity(rVal, idleTree);
ServerEntityTagUtils.attachTagToEntity(rVal, EntityTags.CREATURE);
rVal.putData(EntityDataStrings.DATA_STRING_CREATURE_IS_CREATURE, true);
rVal.putData(EntityDataStrings.DATA_STRING_CREATURE_TYPE, type);