+ ai update.
This commit is contained in:
		@@ -36,6 +36,14 @@ public abstract class PathfinderExecutor {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public abstract void clearTargetAi(LivingEntity entity);
 | 
					    public abstract void clearTargetAi(LivingEntity entity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public abstract Iterable getGoalAi(LivingEntity entity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public abstract Iterable getTargetAi(LivingEntity entity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public abstract void setGoalAi(LivingEntity entity, Iterable ai);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public abstract void setTargetAi(LivingEntity entity, Iterable ai);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public abstract boolean navigationMove(LivingEntity entity, Location location);
 | 
					    public abstract boolean navigationMove(LivingEntity entity, Location location);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public abstract boolean navigationMove(LivingEntity entity, Location location, double speed);
 | 
					    public abstract boolean navigationMove(LivingEntity entity, Location location, double speed);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -130,6 +130,44 @@ public class InternalPathfinderExecutor extends PathfinderExecutor {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public Iterable getGoalAi(LivingEntity entity) {
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            return ((Collection) pathfinderGoalSelectorSet.get(((EntityInsentient) getEntityInsentient(entity)).goalSelector));
 | 
				
			||||||
 | 
					        } catch (Throwable t) {
 | 
				
			||||||
 | 
					            t.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public Iterable getTargetAi(LivingEntity entity) {
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            return ((Collection) pathfinderGoalSelectorSet.get(((EntityInsentient) getEntityInsentient(entity)).targetSelector));
 | 
				
			||||||
 | 
					        } catch (Throwable t) {
 | 
				
			||||||
 | 
					            t.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void setGoalAi(LivingEntity entity, Iterable ai) {
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            pathfinderGoalSelectorSet.set(((EntityInsentient) getEntityInsentient(entity)).goalSelector, ai);
 | 
				
			||||||
 | 
					        } catch (Throwable t) {
 | 
				
			||||||
 | 
					            t.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void setTargetAi(LivingEntity entity, Iterable ai) {
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            pathfinderGoalSelectorSet.set(((EntityInsentient) getEntityInsentient(entity)).targetSelector, ai);
 | 
				
			||||||
 | 
					        } catch (Throwable t) {
 | 
				
			||||||
 | 
					            t.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public boolean navigationMove(LivingEntity entity, Location location) {
 | 
					    public boolean navigationMove(LivingEntity entity, Location location) {
 | 
				
			||||||
        return navigationMove(entity, location, 0.6);
 | 
					        return navigationMove(entity, location, 0.6);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user