Zombies attack every entity! - Completely Remade Version
Originally, this mod was created using MCreator, which, admittedly, wasn't the best solution. Now I've completely rewritten it with code, making the mod significantly better and more optimized.
Flexible Settings
Now you can exclude any mobs from the zombie target list so they won't attack them. The base version of the mod already excludes creepers, zombie villagers, regular zombies, drowneds, and zombie horses.
But you can add any entity to this list. To do this, you just need to create a datapack. If you don't want to bother creating a datapack from scratch, I've prepared a ready-made example that you can download and simply modify to suit your needs.
Important Note for Version 1.21.1
For version 1.21.1, you need to rename the "entity_types" folder to "entity_type" - just remove the letter S at the end.
Datapack Creation Guide
If you want to create a datapack manually, here's a brief guide:
Create a folder with any name for your datapack. Inside this folder, create a file "pack.mcmeta" (without quotes) and add the following text to it:
{
"pack": {
"description": "Your datapack description",
"pack_format": 61
}
}
The description is simply the text that will be displayed when adding the datapack to the world. The pack_format value indicates the version, but even if you set it to 1, the datapack will work in the latest game versions.
Then create a "data" folder, inside it - a "zombiesattackanything" folder, then an "entity_types" folder, and a "zombie_friendly_type.json" file. Add the following code to this file:
{
"replace": false,
"values": [
"namespace:entityid",
"minecraft:zombie"
]
}
And that's it! Now zombies will ignore the specified creatures.
Join our Discord community where you can get help, suggest ideas for new mods, or just chat with other players!