File Details
Controllable Mobs #52
- B
- Nov 8, 2012
- 87.96 KB
- 608
- CB 1.4.2-R0.2
File Name
ControllableMobs.jar
Supported Versions
- CB 1.4.2-R0.2
- action management overhaul - any action method will return a ControllableMobAction instance
- new ControllableMobAction interface
- new method ControllableMobAction.cancel() - cancels the underlying action (removing it from queue too)
- new method ControllableMobAction.getState() - returns an ActionState for the underlying action (IN_QUEUE, RUNNING, BLOCKED, FINISHED, CANCELLED)
- changes for ControllableMob
- added ControllableMob.addAIBehaviors(AIBehavior[] behaviors)
- removed ControllableMob.removeAIBehavior(PathfinderGoal goal)
- ControllableMob.target(null) will remove any target assigned by the AI now
- ControllableMob.setMovementSpeed(float speed): the speed is limited to the range of 0.01 - 2.0 (0.25 default for monsters)
- ControllableMob.target(LivingEntity entity) has now an unlimited range (max range was 16 blocks before)
- ControllableMob.target() will throw an IllegalArgumentException if the target is the entity itself
- changes for ControllableMobs
- added method ControllableMobs.assign(LivingEntity entity, boolean clearAI, float newMovementSpeed)
- added method ControllableMobs.assign(LivingEntity entity, boolean clearAI, float newMovementSpeed, AIBehavior[] additionalAIBehaviors)
- changes for AITargetNearest
- changed constructors: new parameters are float maximumDistance, boolean ignoreInvulnerability, int maximumNoEyeContactTicks, EntityFilter filter, Class<? extends LivingEntity>... targetClasses
- maximumDistance default is 16 blocks, 0 is unlimited
- when ignoreInvulnerability is set to true, invulnerability and invisibility will be ignored and the nearest target attacked anyway. default is false
- maximumNoEyeContactTicks - the target will be lost, if the entity loses eye contact for more ticks then given by this parameter. If set to 0, eye contact doesn't matter
- EntityFilter gives you the ability to only target entities who match custom criteria
- targetClasses will force the entity to target only entites of these given classes and their subclasses. default is HumanEntity.class
- introducing NativeInterfaces - internal an easy way to communicate with the native server core, should help to find errors easily
- calling moveTo with an unreachable location will cause a deadlock for the specific entity

