Ever wanted to make Creepers attack your Farm Animals? Or make Zombies and Skeletons attack each other? Now you can!
This mod simply allows pack developers to let hostile mobs attack entities other then player or those hard-coded into the mod.
Any hostile entity can now be easily configured to attack any entity from any mod, with minimal performance impact!
To effectively utilize this mod, relationships must be defined in .json files in the "CustomMobTargets" config folder.
Important: Any files starting with a double underscore will be ignored, such as the example file. This mod does nothing without user added .json files.
Configuring a .json file for CMT is easy. Simply define an "entity" string key (mod:entity), and a "targets" JSON array. The "targets" array contains a list of JSON objects, for each entity target.
There is no limit on how many targets you can add, and there is no limit to how many .json files can be put in the "CustomMobTargets" folder.
"priority" responds to how important the AI task for attacking is.
"check_sight" handles sight checking. In other words, should the entity target another entity if there is no direct sight, through walls for example.
Here is an example template json file that makes creepers agressive towards sheep:
{
"entity": "minecraft:creeper",
"targets": [
{
"priority": 2,
"check_sight": true,
"entity": "minecraft:sheep"
}
]
}
One extra note is the "/cmt" command.
You can quickly reload configs while the game is running by executing "/cmt reload"
Here is a demo video of how the mod works:
![]()
Permissions:
Note:
Want to discuss anything? Need help with APIs?
Join the discord server and follow Zeitheron on Twitter!
If you would like to support my work, you can become a patron via
Patreon. ![]()