CraftAIPart(AIController<E> controller, B behavior) {
   this.controller = controller;
   this.behavior = behavior;
   this.priority = behavior.getPriority(controller.lastBehaviorPriority);
   controller.lastBehaviorPriority = Math.max(controller.lastBehaviorPriority, this.priority);
   this.goal = behavior.createPathfinderGoal(controller.mob);
   this.type = behavior.getType();
 }
 CraftAIPart(AIController<E> controller, int priority, PathfinderGoal pfg) {
   this.controller = controller;
   this.behavior = null;
   this.priority = priority;
   controller.lastBehaviorPriority = Math.max(controller.lastBehaviorPriority, priority);
   this.goal = pfg;
   this.type = AIType.getTypeByInstance(pfg);
 }