[GH-ISSUE #7572] Mobs ignore Fire Resistance when damaged by commands #3294

Open
opened 2026-11-03 04:07:19 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @TheMrZZ on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7572

Originally assigned to: @TheMrZZ on GitHub.

🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

Mobs given Fire Resistance still accept fire damage from /damage. Current main's Mob::damage_with checks species fire immunity, but does not reject fire damage when the mob has Fire Resistance.

In a loaded area with ticks frozen, summon a fresh pig at 4 200 4 with a unique UUID, NoAI:1b, NoGravity:1b and PersistenceRequired:1b. Give that UUID infinite fire_resistance, run /damage <UUID> 1 minecraft:in_fire, then /data get entity <UUID> Health 1000. Java 26.3 rejects the damage and reports 10000; Horizon accepts it and reports 9000.

The same defect affects campfire, fireball, hot_floor, lava, on_fire, sulfur_cube_hot and unattributed_fireball. Use a fresh UUID for each case. Official LivingEntity.hurtServer rejects IS_FIRE damage with FIRE_RESISTANCE before damage hooks and health processing.

Closed #7251 concerned an invalid player lava test caused by suffocation; this is a mob command-damage reproduction. Existing living-hurt arithmetic fixtures do not cover Mob::damage_with integration. Scope excludes player changes and natural-contact validation.

Originally created by @TheMrZZ on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7572 Originally assigned to: @TheMrZZ on GitHub. > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. Mobs given Fire Resistance still accept fire damage from `/damage`. Current main's `Mob::damage_with` checks species fire immunity, but does not reject fire damage when the mob has Fire Resistance. In a loaded area with ticks frozen, summon a fresh pig at 4 200 4 with a unique UUID, NoAI:1b, NoGravity:1b and PersistenceRequired:1b. Give that UUID infinite fire_resistance, run `/damage <UUID> 1 minecraft:in_fire`, then `/data get entity <UUID> Health 1000`. Java 26.3 rejects the damage and reports 10000; Horizon accepts it and reports 9000. The same defect affects campfire, fireball, hot_floor, lava, on_fire, sulfur_cube_hot and unattributed_fireball. Use a fresh UUID for each case. Official LivingEntity.hurtServer rejects IS_FIRE damage with FIRE_RESISTANCE before damage hooks and health processing. Closed #7251 concerned an invalid player lava test caused by suffocation; this is a mob command-damage reproduction. Existing living-hurt arithmetic fixtures do not cover Mob::damage_with integration. Scope excludes player changes and natural-contact validation.
Author
Owner

@TheMrZZ commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6583903771 --> @TheMrZZ commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3294
No description provided.