mojira.dev
MC-131337

Trident on fire does not set mobs on fire

The bug

If you throw a trident through lava, the trident projectile will be set on fire, but mobs it hits won't be set on fire.

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 14

Just so that you know, You're supposed to put your description of the bug under "Description", not Environment".

Can confirm for 1.13-pre4.

Confirmed for 1.13.1.

Can confirm in 20w51a.

4 more comments

Can confirm in 1.17.1.

Can confirm in 1.18.2 and 22w19a.

Can confirm in 1.19.

Can confirm in 1.19.2.

Code analysis (Mojang mappings, 23w45a): This is because ThrownTrident#onHitEntity does not check if it is on fire and set the hit entity on fire like in AbstractArrow#onHitEntity. This could be a potential fix:

...
        if ($$1.hurt($$5, $$2)) {
            if ($$1.getType() == EntityType.ENDERMAN) {
                return;
            }
            // Added
            if (this.isOnFire()) {
               $$1.setSecondsOnFire(5);
            }
            ...
        } else if ($$1.getType().is(EntityTypeTags.DEFLECTS_TRIDENTS)) {
            this.deflect();
            return;
        }
        ...

Unoriginal Name

(Unassigned)

Confirmed

Entities, Parity

fire, trident

Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre4, Minecraft 1.13-pre6, Minecraft 1.13-pre8, ..., 23w45a, 1.20.3 Pre-Release 3, 1.21.1, 1.21.4, 1.21.8 Release Candidate 1

Retrieved