Controllable Mobs API
Welcome to the API which lets you take full control of (nearly) any entity!
This project has been discontinued!
Features
- order an entity to move or look at specified locations, jump, wait, die, follow or attack custom targets
- fully take control of an entity by planning actions that are added to an action queue
- modify the AI of any entity - remove default behaviors or add custom ones!
- configure custom behaviors with various parameters
- modify an entity's attributes (movement speed, attack damage, ...)
- standalone plugin - just add a dependency and updating will be done in no time.
- Bukkit-friendly API - you don't have to deal with Craftbukkit code or native minecraft server code.
- server-only mod - does not require client modifications
API tutorials
work-in-progress (is not being maintained atm)
- The basics (creating a plugin, spawning entities, creating actions)
API Documentation
- Setting up a plugin with Controllable Mobs API
- Basic steps
- Make entities controllable
- Adjust attributes
- Modifying AI behaviors
- Managing entity actions
- Some examples
API resources
- Latest javadoc
- Javadoc for v5
- Javadoc for v4
- API source code at GitHub
- Test plugin source code at GitHub
Important notes
Got any problems?
- Make sure you are using the correct plugin, matching your Minecraft server's version.
- Search the tickets for an error similar to yours, if it is already existing, do not post a new ticket. Instead, post a comment to the existing ticket.
- If the problem hasn't been reported yet, Open a new ticket. Provide as many information as possible. I won't handle issues posted as comments.
Want new features?
I can always provide more features, as needed! You just have to open a new ticket. Provide as many details as possible. I won't handle feature requests posted as comments.
-
View User Profile
-
Send Message
Posted May 25, 2013Entity sheep = player.getWorld().spawnEntity(player.getLocation(), org.bukkit.entity.EntityType.COW);
LivingEntity sheep1 = (LivingEntity) sheep;
controlledZombie.getEntity().setTarget(sheep1);
When I spawn an entity (a cow), then convert it to a LivingEntity, then set my controlledZombies' target to it, it doesnt target the entity. (I'm trying to make controlledZombie target and attack sheep1. sheep1 being the cow I spawned)
-
View User Profile
-
Send Message
Posted May 22, 2013Helo,
When im trying to follow the basic tutoeial. I keep getting some errors. Sorry if thisis a dumb question, im new into java.
Errors:
ControllableMob cannot be resolved to a type HashMap cannot be resolved to a type Player cannot be resolved to a type zombieMap cannot be resolved to a type
-
View User Profile
-
Send Message
Posted May 18, 2013@DevCybran
What do I do when I constantly get NoClassDefFoundError?
Its happened when I tried messing with nms code myself. Am I exporting wrong or something? @DevCybran
-
View User Profile
-
Send Message
Posted May 13, 2013@DevCybran
Thanks :)
-
View User Profile
-
Send Message
Posted May 13, 2013Made a quick update for 1.5.2!
@bielsr
Yes, I know the search and replace function, and no, I don't think there is a possibility to refactorize it. Unfortunately, replacing the package names is rarely sufficient, minecraft methods and variables often change.
I'm working to bring the sources to GitHub, but I'm not familiar with git, so it may take a while.
Edit: EGit successully deleted all origin files when I tried to remove a local repo. I hate this thing right now.
-
View User Profile
-
Send Message
Posted May 12, 2013Is this plugin dead? D: Really need this updated!
-
View User Profile
-
Send Message
Posted May 7, 2013Can you update it for the latest beta build of Bukkit? I think it's only changing the import names in the source as the Bukkit API should not be different. You can do it by:
- Search and replace
- I don't know if there is a refactor option to do it
Can I find the source of the API anywhere?
-
View User Profile
-
Send Message
Posted May 6, 2013Even though I won't use this api as I have my own, I have two questions: 1. You check for dependent plugins and not for softdependent. Why? 2. Why do you still use the native pathfinders in the back? Doesn't that limit you a bit too much on what you could do?
-
View User Profile
-
Send Message
Posted May 3, 2013Broke with v1_5_R3
Could you please release a repo on github or something.
-
View User Profile
-
Send Message
Posted Apr 17, 2013@bielsr
Unfortunately, this is not possible (yet) :( I really wanted to provide those events, but I can't, because
But there are other possibilites to control the targeting. Have a look at my custom AITargetNearest class, you can provide an EntityFilter to select entities based on custom rules.
-
View User Profile
-
Send Message
Posted Apr 16, 2013Are there any way to get events triggered from the AI? For example: onEntityTargetChange or onAttack, ...
So you then can cancel them or change parameters. In my case I want do something like this:
@EventHandler
public void onEntityTargetChange (EntityTargetChangeEvent evt) {
if (getTeam(evt.getEntity.getID()) == getTeam(evt.getNewTarget().getID())){
evt.setCancelled(true);
}
}
So the mob won't target his own team entities.
Is this possible?
-
View User Profile
-
Send Message
Posted Apr 15, 2013@DevCybran
thanks! i made it work, great api thanks
-
View User Profile
-
Send Message
Posted Apr 14, 2013@mineartofficial
Ok, I don't know why the restoring inside the event does not have the desired effect. Anyway, there is an even better solution:
Instead of
you do
This will remove all AI parts except that one that will make the pig follow the carrot stick.
-
View User Profile
-
Send Message
Posted Apr 13, 2013@DevCybran
Pigs should not be able to move until somebody rides them:
ControllableMob<Pig> auto = ControllableMobs.assign(pig, true);
That's working, but when I mount it, it does not follow the carrot stick:
[PlayerInteractEntityEvent]
if (((Vehicle) pigAnimal).getPassenger() == null) {
pigControl.getAI().restoreAIBehaviors();
}
Great API by the way
-
View User Profile
-
Send Message
Posted Apr 10, 2013@Jecba
If you want to work with 1.5.1, you have to download the latest alpha build. But since nobody posted an issue, I suppose it's safe to work with. Bringing out a release soon.
-
View User Profile
-
Send Message
Posted Apr 10, 2013i cant make this work for 1.5.1. Is it the api that needs to be updated? Or am i retarded?
-
View User Profile
-
Send Message
Posted Mar 23, 2013@DevCybran
Thanks :)
-
View User Profile
-
Send Message
Posted Mar 23, 2013@TFCatfish
It still needs approval and is therefore not visible to you yet.. the bukkit staff is not that fast this time :P
However, you should be able to download it using this direct link: http:dev.bukkit.org/server-mods/controllable-mobs-api/files/13-controllable-mobs-api-v4-alpha-1/ - of course on your own risk ;)
-
View User Profile
-
Send Message
Posted Mar 23, 2013@DevCybran
How do I get this Alpha Build?
-
View User Profile
-
Send Message
Posted Mar 22, 2013@DevCybran
:) thanks.