Protect owned pets from lethal damage on Forge

This commit is contained in:
Frederik Spirgi
2026-10-12 09:35:41 +02:00
parent b82489f9d3
commit 59ccc9e106
10 changed files with 286 additions and 12 deletions
+3 -1
View File
@@ -12,4 +12,6 @@ Mobs cannot execute players who are currently being carried. Press V near a knoc
Fire, lava, fall, and explosion deaths bypass the knocked state and kill normally.
Animations and other stuff like config files and custom items for reviving will come in future updates.
Owned pets also survive lethal combat damage at 1 HP. They cannot take ordinary damage while knocked, and recover with four health after 20 seconds. Hold H within two blocks to help a knocked pet recover sooner. Their owner receives a chat notice. The pet's recovery timer is saved with the entity, so it resumes after a world reload. Tamed animals and modded followers that implement Minecraft's `OwnableEntity` interface are protected automatically.
For modded followers without vanilla ownership data, add their entity type IDs to `pets.protectedEntityTypes` in the Forge config file (`config/knockedback-common.toml`). Every mob of a listed type is protected, so list only the follower types you want to save. Pet protection, recovery time, recovery health, and player help are configurable in the same section.