Skip to content

PigZombieAngerEvent is completely borked #5319

@drunderscore

Description

@drunderscore

What behaviour is expected:

Canceling the PigZombieAngerEvent makes the pig zombie not angry, and doesn't propagate his anger to nearby pig zombies.

What behaviour is observed:

Pig zombie becomes angry regardless, propagates anger to nearby pig zombies, and continuously calls the event to decide if he should remain angry, despite remaining angry regardless of the cancellation of the event.

Steps/models to reproduce:

@EventHandler
private void onPigZombieAnger(PigZombieAngerEvent e)
{
    Bukkit.broadcastMessage("he angry with " + e.getNewAnger());
    // Even setting the angry of the pig zombie to false here does not properly work.
    // e.getEntity().setAngry(false);
    e.setCancelled(true);
}

Paper version:

Paper 526

Anything else:

The problem also occurs in spigot. Should this be put to the spigot JIRA?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.version: 1.16Game version 1.16

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions