Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Passive Mobs Wiki › Guides › Keep Specific Mobs Hostile Using Data Packs

Keep Specific Mobs Hostile Using Data Packs

Setting Up Your Data Pack

While Passive Mobs Mod makes all hostile creatures peaceful by default, you can restore hostility to specific mob types using the data pack tag system.

First, create or locate your data pack folder in your world directory. Navigate to data/ and create a new namespace folder (e.g., mypack). Inside, create the path tags/entity_types/.

Adding Mobs to the Hostile Tag

Create a JSON file named hostile.json in your tags/entity_types/ folder. This file tells the mod which mobs should remain aggressive.

Inside the file, list the mob IDs you want to keep hostile:

`json

{

"values": [

"minecraft:creeper",

"minecraft:skeleton",

"minecraft:zombie"

]

}

`

Replace the mob IDs with whichever creatures you want to be dangerous. Common hostile mobs include enderman, witch, spider, cave_spider, phantom, and warden.

Save the file, reload your world, and tagged mobs will now attack you as normal while others remain peaceful.