// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/api/ai/AIType.java
// public enum AIType {
// 	ATTACK_RANGED(PathfinderGoalArrowAttack.class),
// 	MOVE_AVOIDPLAYER(PathfinderGoalAvoidPlayer.class),
// 	ACTION_BEG(PathfinderGoalBeg.class),
// 	ACTION_DOORBREAK(PathfinderGoalBreakDoor.class),
// 	ACTION_BREED(PathfinderGoalBreed.class),
// 	ACTION_DEFENDVILLAGE(PathfinderGoalDefendVillage.class),
// 	ACTION_EATTILE(PathfinderGoalEatTile.class),
// 	MOVE_FLEESUN(PathfinderGoalFleeSun.class),
// 	MOVE_SWIM(PathfinderGoalFloat.class),
// 	MOVE_FOLLOWONWNER(PathfinderGoalFollowOwner.class),
// 	MOVE_FOLLOWPARENT(PathfinderGoalFollowParent.class),
// 	TARGET_HURTBY(PathfinderGoalHurtByTarget.class),
// 	ACTION_ENTITYINTERACT(PathfinderGoalInteract.class),
// 	MOVE_JUMPONBLOCK(PathfinderGoalJumpOnBlock.class),
// 	ATTACK_LEAP(PathfinderGoalLeapAtTarget.class),
// 	ACTION_ENTITYLOOK(PathfinderGoalLookAtPlayer.class),
// 	ACTION_PLAYERTRADINGLOOK(PathfinderGoalLookAtTradingPlayer.class),
// 	ACTION_LOVE(PathfinderGoalMakeLove.class),
// 	ATTACK_MELEE(PathfinderGoalMeleeAttack.class),
// 	MOVE_INDOORS(PathfinderGoalMoveIndoors.class),
// 	MOVE_VILLAGE(PathfinderGoalMoveThroughVillage.class),
// 	MOVE_RESTRICTED(PathfinderGoalMoveTowardsRestriction.class),
// 	MOVE_TARGET(PathfinderGoalMoveTowardsTarget.class),
// 	TARGET_NEAREST(PathfinderGoalNearestAttackableTarget.class),
// 	ATTACK_OCELOT(PathfinderGoalOcelotAttack.class),
// 	ACTION_FLOWEROFFER(PathfinderGoalOfferFlower.class),
// 	ACTION_DOOROPEN(PathfinderGoalOpenDoor.class),
// 	TARGET_OWNERATTACKER(PathfinderGoalOwnerHurtByTarget.class),
// 	TARGET_OWNERTARGET(PathfinderGoalOwnerHurtTarget.class),
// 	MOVE_PANIC(PathfinderGoalPanic.class),
// 	MOVE_FOLLOWCARROT(PathfinderGoalPassengerCarrotStick.class),
// 	ACTION_PLAY(PathfinderGoalPlay.class),
// 	ACTION_RANDOMLOOK(PathfinderGoalRandomLookaround.class),
// 	MOVE_RANDOMSTROLL(PathfinderGoalRandomStroll.class),
// 	TARGET_NEARESTNONTAMED(PathfinderGoalRandomTargetNonTamed.class),
// 	MOVE_RESTRICTOPENDOOR(PathfinderGoalRestrictOpenDoor.class),
// 	MOVE_RESTRICTSUN(PathfinderGoalRestrictSun.class),
// 	ACTION_SIT(PathfinderGoalSit.class),
// 	ATTACK_SWELL(PathfinderGoalSwell.class),
// 	ACTION_FLOWERTAKE(PathfinderGoalTakeFlower.class),
// 	ACTION_TAME(PathfinderGoalTame.class),
// 	ACTION_TEMPT(PathfinderGoalTempt.class),
// 	ACTION_PLAYERTRADE(PathfinderGoalTradeWithPlayer.class),
// 	UNKNOWN(null);
// 	
// 	private final Class<? extends PathfinderGoal> nmsPathfinderClass;
// 	
// 	private AIType(Class<? extends PathfinderGoal> pfgClass) {
// 		this.nmsPathfinderClass = pfgClass;
// 	}
// 	
// 	
// 	private static final Map<Class<? extends PathfinderGoal>,AIType> classTypeMap;
// 	
// 	static {
// 		classTypeMap = new HashMap<Class<? extends PathfinderGoal>,AIType>();
// 		for(AIType type: AIType.values()) {
// 			if(type!=AIType.UNKNOWN) classTypeMap.put(type.nmsPathfinderClass, type);
// 		}
// 	}
// 	
// 	/**
// 	 * You won't need this. But the API implementation will.
// 	 */
// 	public static AIType getTypeByInstance(PathfinderGoal goal) {
// 		if(classTypeMap.containsKey(goal.getClass())) return classTypeMap.get(goal.getClass());
// 		else return AIType.UNKNOWN;
// 	}
// 
// }
// 
// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/api/ai/behaviors/AIBehavior.java
// public abstract class AIBehavior<E extends LivingEntity> {
// 	private final int priority;
// 	
// 	public AIBehavior(int priority) {
// 		this.priority = priority;
// 	}
// 	
// 	public final int getPriority(int lastBehaviorPriority) {
// 		return this.priority<=0 ? lastBehaviorPriority+1 : this.priority;
// 	}
// 	
// 	/**
// 	 * @return the type of this behavior
// 	 */
// 	public abstract AIType getType();
// 
// 	public abstract PathfinderGoal createPathfinderGoal(CraftControllableMob<? extends E> mob);
// 	
// }


import net.minecraft.server.v1_7_R1.PathfinderGoal;
import org.bukkit.entity.LivingEntity;
import de.ntcomputer.minecraft.controllablemobs.api.ControllableMob;
import de.ntcomputer.minecraft.controllablemobs.api.ai.AIPart;
import de.ntcomputer.minecraft.controllablemobs.api.ai.AIState;
import de.ntcomputer.minecraft.controllablemobs.api.ai.AIType;
import de.ntcomputer.minecraft.controllablemobs.api.ai.behaviors.AIBehavior;

package de.ntcomputer.minecraft.controllablemobs.implementation.ai;




public class CraftAIPart<E extends LivingEntity, B extends AIBehavior<? super E>> implements AIPart<E,B> {
	private final B behavior;
	final int priority;

// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/api/ai/AIType.java
// public enum AIType {
// 	ATTACK_RANGED(PathfinderGoalArrowAttack.class),
// 	MOVE_AVOIDPLAYER(PathfinderGoalAvoidPlayer.class),
// 	ACTION_BEG(PathfinderGoalBeg.class),
// 	ACTION_DOORBREAK(PathfinderGoalBreakDoor.class),
// 	ACTION_BREED(PathfinderGoalBreed.class),
// 	ACTION_DEFENDVILLAGE(PathfinderGoalDefendVillage.class),
// 	ACTION_EATTILE(PathfinderGoalEatTile.class),
// 	MOVE_FLEESUN(PathfinderGoalFleeSun.class),
// 	MOVE_SWIM(PathfinderGoalFloat.class),
// 	MOVE_FOLLOWONWNER(PathfinderGoalFollowOwner.class),
// 	MOVE_FOLLOWPARENT(PathfinderGoalFollowParent.class),
// 	TARGET_HURTBY(PathfinderGoalHurtByTarget.class),
// 	ACTION_ENTITYINTERACT(PathfinderGoalInteract.class),
// 	MOVE_JUMPONBLOCK(PathfinderGoalJumpOnBlock.class),
// 	ATTACK_LEAP(PathfinderGoalLeapAtTarget.class),
// 	ACTION_ENTITYLOOK(PathfinderGoalLookAtPlayer.class),
// 	ACTION_PLAYERTRADINGLOOK(PathfinderGoalLookAtTradingPlayer.class),
// 	ACTION_LOVE(PathfinderGoalMakeLove.class),
// 	ATTACK_MELEE(PathfinderGoalMeleeAttack.class),
// 	MOVE_INDOORS(PathfinderGoalMoveIndoors.class),
// 	MOVE_VILLAGE(PathfinderGoalMoveThroughVillage.class),
// 	MOVE_RESTRICTED(PathfinderGoalMoveTowardsRestriction.class),
// 	MOVE_TARGET(PathfinderGoalMoveTowardsTarget.class),
// 	TARGET_NEAREST(PathfinderGoalNearestAttackableTarget.class),
// 	ATTACK_OCELOT(PathfinderGoalOcelotAttack.class),
// 	ACTION_FLOWEROFFER(PathfinderGoalOfferFlower.class),
// 	ACTION_DOOROPEN(PathfinderGoalOpenDoor.class),
// 	TARGET_OWNERATTACKER(PathfinderGoalOwnerHurtByTarget.class),
// 	TARGET_OWNERTARGET(PathfinderGoalOwnerHurtTarget.class),
// 	MOVE_PANIC(PathfinderGoalPanic.class),
// 	MOVE_FOLLOWCARROT(PathfinderGoalPassengerCarrotStick.class),
// 	ACTION_PLAY(PathfinderGoalPlay.class),
// 	ACTION_RANDOMLOOK(PathfinderGoalRandomLookaround.class),
// 	MOVE_RANDOMSTROLL(PathfinderGoalRandomStroll.class),
// 	TARGET_NEARESTNONTAMED(PathfinderGoalRandomTargetNonTamed.class),
// 	MOVE_RESTRICTOPENDOOR(PathfinderGoalRestrictOpenDoor.class),
// 	MOVE_RESTRICTSUN(PathfinderGoalRestrictSun.class),
// 	ACTION_SIT(PathfinderGoalSit.class),
// 	ATTACK_SWELL(PathfinderGoalSwell.class),
// 	ACTION_FLOWERTAKE(PathfinderGoalTakeFlower.class),
// 	ACTION_TAME(PathfinderGoalTame.class),
// 	ACTION_TEMPT(PathfinderGoalTempt.class),
// 	ACTION_PLAYERTRADE(PathfinderGoalTradeWithPlayer.class),
// 	UNKNOWN(null);
// 	
// 	private final Class<? extends PathfinderGoal> nmsPathfinderClass;
// 	
// 	private AIType(Class<? extends PathfinderGoal> pfgClass) {
// 		this.nmsPathfinderClass = pfgClass;
// 	}
// 	
// 	
// 	private static final Map<Class<? extends PathfinderGoal>,AIType> classTypeMap;
// 	
// 	static {
// 		classTypeMap = new HashMap<Class<? extends PathfinderGoal>,AIType>();
// 		for(AIType type: AIType.values()) {
// 			if(type!=AIType.UNKNOWN) classTypeMap.put(type.nmsPathfinderClass, type);
// 		}
// 	}
// 	
// 	/**
// 	 * You won't need this. But the API implementation will.
// 	 */
// 	public static AIType getTypeByInstance(PathfinderGoal goal) {
// 		if(classTypeMap.containsKey(goal.getClass())) return classTypeMap.get(goal.getClass());
// 		else return AIType.UNKNOWN;
// 	}
// 
// }
// 
// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/api/ai/behaviors/AIBehavior.java
// public abstract class AIBehavior<E extends LivingEntity> {
// 	private final int priority;
// 	
// 	public AIBehavior(int priority) {
// 		this.priority = priority;
// 	}
// 	
// 	public final int getPriority(int lastBehaviorPriority) {
// 		return this.priority<=0 ? lastBehaviorPriority+1 : this.priority;
// 	}
// 	
// 	/**
// 	 * @return the type of this behavior
// 	 */
// 	public abstract AIType getType();
// 
// 	public abstract PathfinderGoal createPathfinderGoal(CraftControllableMob<? extends E> mob);
// 	
// }


// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/implementation/ai/CraftAIPart.java
import net.minecraft.server.v1_7_R1.PathfinderGoal;
import org.bukkit.entity.LivingEntity;
import de.ntcomputer.minecraft.controllablemobs.api.ControllableMob;
import de.ntcomputer.minecraft.controllablemobs.api.ai.AIPart;
import de.ntcomputer.minecraft.controllablemobs.api.ai.AIState;
import de.ntcomputer.minecraft.controllablemobs.api.ai.AIType;
import de.ntcomputer.minecraft.controllablemobs.api.ai.behaviors.AIBehavior;

package de.ntcomputer.minecraft.controllablemobs.implementation.ai;




public class CraftAIPart<E extends LivingEntity, B extends AIBehavior<? super E>> implements AIPart<E,B> {
	private final B behavior;
	final int priority;

	private final AIType type;
