MinecraftHub.io
Java Mods

Friendly Fire

Darkhax's combat tweak makes pets immune to attacks from their owner and from pets with the same owner, and protects baby animals from every source. Sneak while attacking to override it.

MinecraftHub-generated cover art for Friendly Fire: a floating wooded block island with a workshop of crafting tables and furnaces, under a day sky

Screenshot 1 of 1. MinecraftHub-generated cover art for Friendly Fire: a floating wooded block island with a workshop of crafting tables and furnaces, under a day sky

What Friendly Fire works with.

PlatformJava Edition
LoadersFabric, NeoForge, Forge
Minecraft versions1.7.10, 1.15.2, 1.16.5, 1.17.1, 1.18.2, 1.19.4, 1.20.4, 26.1.2, 26.2, 26.3
EnvironmentClient, Server

This friendly fire mod from Darkhax stops players from hurting their own pets by accident. It runs on Fabric, NeoForge and Forge, and it has to be installed on both client and server. The core idea is simple: a pet that jumps into the path of a swing, or a misclick while feeding, no longer costs you the animal.

Loaders and versions

  • Fabric: Minecraft 1.18.2 to 26.3. The newest build requires Fabric API and Prickle; builds for 1.20 to 1.20.4 require Fabric API and Bookshelf; some builds for 1.18.2 to 1.19.4 require Bookshelf; some builds for 1.18.2 need no dependencies.
  • NeoForge: Minecraft 1.20.2 to 26.3. The newest build requires Prickle; builds for 1.20.2 to 1.20.4 require Bookshelf.
  • Forge: Minecraft 1.7.10 to 1.20.4. The newest build requires Bookshelf; some builds for 1.7.10 to 1.18.2 need no dependencies.
  • Quilt: Minecraft 1.19 to 1.19.4, builds stopped after June 2023. The newest build requires Bookshelf.

What it protects

  • Pets are immune to attacks from their owner.
  • Pets are immune to damage from other pets with the same owner.
  • Baby animals are immune to attacks from all sources.
  • Sneaking while you attack lets you hit a protected mob when you really need to.

Modded pets are covered too, as long as the mod that adds them defines the entity as an ownable pet. If a modded pet is not protected, that definition is missing on the other mod's side.

Configuration and datapack tags

The mod provides configuration options that change or disable the types of mobs that are protected. For finer control, it ships three tags that datapacks can edit.

  • friendlyfire:bypass_pet is an item tag for items that skip pet protection.
  • friendlyfire:bypass_all is an item tag for items that skip every protection the mod offers.
  • friendlyfire:general_protection is an entity tag that grants other mobs protection from combat damage, villagers for example.

Darkhax suggests Open Loader to make installing datapacks like this less fiddly.

Installing it

Drop the mod file and the libraries it needs into the mods folder, then launch with the matching loader profile. New to this? The guides for installing Java mods and setting up Fabric cover the steps.

Questions about Friendly Fire.

3 questions

How do I hit a pet protected by Friendly Fire?

Sneak (crouch) while you perform the attack. The protection is skipped when you do, so you can still kill a protected mob on purpose. You can also use the configuration options or the bypass item tags to change which mobs and items are covered.

Does Friendly Fire work with modded pets?

Yes, modded pets should work. If one is not protected, the mod that adds it has not defined the entity as an ownable pet in its code. In that case the general_protection entity tag may be used to add the mob to the protection list through a datapack.

Does Friendly Fire need to be installed on a multiplayer server?

Yes. The mod is required on both the client and the server, so the host and every player should have it. Pets then cannot be hurt by their owner or by other pets with the same owner, and baby animals are immune to all attacks.

More Java Mods like Friendly Fire.

Guides for Java Mods.

Browse all Minecraft Java mods ↗