--- a/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
+++ b/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
@@ -21,6 +21,7 @@
 import net.minecraft.world.level.pathfinder.BlockPathTypes;
 
 public abstract class AbstractPiglin extends Monster {
+
     protected static final EntityDataAccessor<Boolean> DATA_IMMUNE_TO_ZOMBIFICATION = SynchedEntityData.defineId(AbstractPiglin.class, EntityDataSerializers.BOOLEAN);
     protected static final int CONVERSION_TIME = 300;
     public int timeInOverworld;
@@ -35,7 +36,7 @@
 
     private void applyOpenDoorsAbility() {
         if (GoalUtils.hasGroundPathNavigation(this)) {
-            ((GroundPathNavigation)this.getNavigation()).setCanOpenDoors(true);
+            ((GroundPathNavigation) this.getNavigation()).setCanOpenDoors(true);
         }
 
     }
@@ -43,17 +44,17 @@
     protected abstract boolean canHunt();
 
     public void setImmuneToZombification(boolean immuneToZombification) {
-        this.getEntityData().set(DATA_IMMUNE_TO_ZOMBIFICATION, immuneToZombification);
+        this.getEntityData().set(AbstractPiglin.DATA_IMMUNE_TO_ZOMBIFICATION, immuneToZombification);
     }
 
     public boolean isImmuneToZombification() {
-        return this.getEntityData().get(DATA_IMMUNE_TO_ZOMBIFICATION);
+        return (Boolean) this.getEntityData().get(AbstractPiglin.DATA_IMMUNE_TO_ZOMBIFICATION);
     }
 
     @Override
     protected void defineSynchedData() {
         super.defineSynchedData();
-        this.entityData.define(DATA_IMMUNE_TO_ZOMBIFICATION, false);
+        this.entityData.define(AbstractPiglin.DATA_IMMUNE_TO_ZOMBIFICATION, false);
     }
 
     @Override
@@ -89,7 +90,7 @@
 
         if (this.timeInOverworld > 300) {
             this.playConvertedSound();
-            this.finishConversion((ServerLevel)this.level);
+            this.finishConversion((ServerLevel) this.level);
         }
 
     }
@@ -99,10 +100,16 @@
     }
 
     protected void finishConversion(ServerLevel world) {
-        ZombifiedPiglin zombifiedPiglin = this.convertTo(EntityType.ZOMBIFIED_PIGLIN, true);
-        if (zombifiedPiglin != null) {
-            zombifiedPiglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
+        ZombifiedPiglin entitypigzombie = (ZombifiedPiglin) this.convertTo(EntityType.ZOMBIFIED_PIGLIN, true, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons
+
+        if (entitypigzombie != null) {
+            entitypigzombie.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
+        }
+        // Paper start - reset to prevent event spam
+        else {
+            this.timeInOverworld = 0;
         }
+        // Paper end
 
     }
 
@@ -115,7 +122,7 @@
     @Nullable
     @Override
     public LivingEntity getTarget() {
-        return this.brain.getMemory(MemoryModuleType.ATTACK_TARGET).orElse((LivingEntity)null);
+        return (LivingEntity) this.brain.getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null); // CraftBukkit - decompile error
     }
 
     protected boolean isHoldingMeleeWeapon() {
