--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
@@ -43,8 +43,9 @@
 import org.joml.Vector3f;
 
 public class ZombifiedPiglin extends Zombie implements NeutralMob {
+
     private static final UUID SPEED_MODIFIER_ATTACKING_UUID = UUID.fromString("49455A49-7EC5-45BA-B886-3B90B23A1718");
-    private static final AttributeModifier SPEED_MODIFIER_ATTACKING = new AttributeModifier(SPEED_MODIFIER_ATTACKING_UUID, "Attacking speed boost", 0.05D, AttributeModifier.Operation.ADDITION);
+    private static final AttributeModifier SPEED_MODIFIER_ATTACKING = new AttributeModifier(ZombifiedPiglin.SPEED_MODIFIER_ATTACKING_UUID, "Attacking speed boost", 0.05D, AttributeModifier.Operation.ADDITION);
     private static final UniformInt FIRST_ANGER_SOUND_DELAY = TimeUtil.rangeOfSeconds(0, 1);
     private int playFirstAngerSoundIn;
     private static final UniformInt PERSISTENT_ANGER_TIME = TimeUtil.rangeOfSeconds(20, 39);
@@ -56,6 +57,7 @@
     private int ticksUntilNextAlert;
     private static final float ZOMBIFIED_PIGLIN_EYE_HEIGHT = 1.79F;
     private static final float ZOMBIFIED_PIGLIN_BABY_EYE_HEIGHT_ADJUSTMENT = 0.82F;
+    private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper
 
     public ZombifiedPiglin(EntityType<? extends ZombifiedPiglin> type, Level world) {
         super(type, world);
@@ -71,13 +73,13 @@
     protected void addBehaviourGoals() {
         this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
         this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
-        this.targetSelector.addGoal(1, (new HurtByTargetGoal(this)).setAlertOthers());
+        this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - assign field
         this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
         this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
     }
 
     public static AttributeSupplier.Builder createAttributes() {
-        return Zombie.createAttributes().add(Attributes.SPAWN_REINFORCEMENTS_CHANCE, 0.0D).add(Attributes.MOVEMENT_SPEED, (double)0.23F).add(Attributes.ATTACK_DAMAGE, 5.0D);
+        return Zombie.createAttributes().add(Attributes.SPAWN_REINFORCEMENTS_CHANCE, 0.0D).add(Attributes.MOVEMENT_SPEED, 0.23000000417232513D).add(Attributes.ATTACK_DAMAGE, 5.0D);
     }
 
     @Override
@@ -92,18 +94,19 @@
 
     @Override
     protected void customServerAiStep() {
-        AttributeInstance attributeInstance = this.getAttribute(Attributes.MOVEMENT_SPEED);
+        AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
+
         if (this.isAngry()) {
-            if (!this.isBaby() && !attributeInstance.hasModifier(SPEED_MODIFIER_ATTACKING)) {
-                attributeInstance.addTransientModifier(SPEED_MODIFIER_ATTACKING);
+            if (!this.isBaby() && !attributemodifiable.hasModifier(ZombifiedPiglin.SPEED_MODIFIER_ATTACKING)) {
+                attributemodifiable.addTransientModifier(ZombifiedPiglin.SPEED_MODIFIER_ATTACKING);
             }
 
             this.maybePlayFirstAngerSound();
-        } else if (attributeInstance.hasModifier(SPEED_MODIFIER_ATTACKING)) {
-            attributeInstance.removeModifier(SPEED_MODIFIER_ATTACKING.getId());
+        } else if (attributemodifiable.hasModifier(ZombifiedPiglin.SPEED_MODIFIER_ATTACKING)) {
+            attributemodifiable.removeModifier(ZombifiedPiglin.SPEED_MODIFIER_ATTACKING.getId());
         }
 
-        this.updatePersistentAnger((ServerLevel)this.level(), true);
+        this.updatePersistentAnger((ServerLevel) this.level(), true);
         if (this.getTarget() != null) {
             this.maybeAlertOthers();
         }
@@ -133,21 +136,22 @@
                 this.alertOthers();
             }
 
-            this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random);
+            this.ticksUntilNextAlert = ZombifiedPiglin.ALERT_INTERVAL.sample(this.random);
         }
     }
 
     private void alertOthers() {
-        double d = this.getAttributeValue(Attributes.FOLLOW_RANGE);
-        AABB aABB = AABB.unitCubeFromLowerCorner(this.position()).inflate(d, 10.0D, d);
-        this.level().getEntitiesOfClass(ZombifiedPiglin.class, aABB, EntitySelector.NO_SPECTATORS).stream().filter((zombifiedPiglin) -> {
-            return zombifiedPiglin != this;
-        }).filter((zombifiedPiglin) -> {
-            return zombifiedPiglin.getTarget() == null;
-        }).filter((zombifiedPiglin) -> {
-            return !zombifiedPiglin.isAlliedTo(this.getTarget());
-        }).forEach((zombifiedPiglin) -> {
-            zombifiedPiglin.setTarget(this.getTarget());
+        double d0 = this.getAttributeValue(Attributes.FOLLOW_RANGE);
+        AABB axisalignedbb = AABB.unitCubeFromLowerCorner(this.position()).inflate(d0, 10.0D, d0);
+
+        this.level().getEntitiesOfClass(ZombifiedPiglin.class, axisalignedbb, EntitySelector.NO_SPECTATORS).stream().filter((entitypigzombie) -> {
+            return entitypigzombie != this;
+        }).filter((entitypigzombie) -> {
+            return entitypigzombie.getTarget() == null;
+        }).filter((entitypigzombie) -> {
+            return !entitypigzombie.isAlliedTo((Entity) this.getTarget());
+        }).forEach((entitypigzombie) -> {
+            entitypigzombie.setTarget(this.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_NEARBY_ENTITY, true); // CraftBukkit
         });
     }
 
@@ -156,22 +160,32 @@
     }
 
     @Override
-    public void setTarget(@Nullable LivingEntity target) {
-        if (this.getTarget() == null && target != null) {
-            this.playFirstAngerSoundIn = FIRST_ANGER_SOUND_DELAY.sample(this.random);
-            this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random);
+    public boolean setTarget(@Nullable LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { // CraftBukkit - signature
+        if (this.getTarget() == null && entityliving != null) {
+            this.playFirstAngerSoundIn = ZombifiedPiglin.FIRST_ANGER_SOUND_DELAY.sample(this.random);
+            this.ticksUntilNextAlert = ZombifiedPiglin.ALERT_INTERVAL.sample(this.random);
         }
 
-        if (target instanceof Player) {
-            this.setLastHurtByPlayer((Player)target);
+        if (entityliving instanceof Player) {
+            this.setLastHurtByPlayer((Player) entityliving);
         }
 
-        super.setTarget(target);
+        return super.setTarget(entityliving, reason, fireEvent); // CraftBukkit
     }
 
     @Override
     public void startPersistentAngerTimer() {
-        this.setRemainingPersistentAngerTime(PERSISTENT_ANGER_TIME.sample(this.random));
+        // CraftBukkit start
+        Entity entity = ((ServerLevel) this.level()).getEntity(this.getPersistentAngerTarget());
+        org.bukkit.event.entity.PigZombieAngerEvent event = new org.bukkit.event.entity.PigZombieAngerEvent((org.bukkit.entity.PigZombie) this.getBukkitEntity(), (entity == null) ? null : entity.getBukkitEntity(), ZombifiedPiglin.PERSISTENT_ANGER_TIME.sample(this.random));
+        this.level().getCraftServer().getPluginManager().callEvent(event);
+        if (event.isCancelled()) {
+            this.setPersistentAngerTarget(null);
+            pathfinderGoalHurtByTarget.stop(); // Paper - clear goalTargets to fix cancellation
+            return;
+        }
+        this.setRemainingPersistentAngerTime(event.getNewAnger());
+        // CraftBukkit end
     }
 
     public static boolean checkZombifiedPiglinSpawnRules(EntityType<ZombifiedPiglin> type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) {
