mojira.dev

Eragon327

Assigned

No issues.

Reported

No issues.

Comments

Symbol source: public PDB 1.21.3, decompiled. This may differ from current builds.
EvokerFangs::normalTick obtains entities via fetchEntities2 and iterates the result with a do/while. When it damages a ZombifiedPiglin, ZombifiedPiglin::hurt triggers anger propagation, which calls fetchEntities over a larger area. That nested query appears to reuse/mutate the same entity query buffer, so the fangs continue iterating into newly added entities. This matches the observed AOE range being the same as the piglin anger range.
With a test plugin, calling fetchEntities inside another mob's hurt handler can make that mob also trigger similar fang AOE behavior. This is not an official-API repro, but it supports the reentrancy hypothesis.
Suggested fix: snapshot the target list before damage, use separate/reentrant-safe query buffers for nested queries.