--- a/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
+++ b/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
@@ -82,7 +_,7 @@
this.timeInOverworld = 0;
}
- if (this.timeInOverworld > 300) {
+ if (this.timeInOverworld > 300 && net.minecraftforge.event.ForgeEventFactory.canLivingConvert(this, EntityType.ZOMBIFIED_PIGLIN, (timer) -> this.timeInOverworld = timer)) {
this.playConvertedSound();
this.finishConversion(p_360786_);
}
@@ -101,7 +_,10 @@
this.convertTo(
EntityType.ZOMBIFIED_PIGLIN,
ConversionParams.single(this, true, true),
- p_390698_ -> p_390698_.addEffect(new MobEffectInstance(MobEffects.NAUSEA, 200, 0))
+ p_390698_ -> {
+ p_390698_.addEffect(new MobEffectInstance(MobEffects.NAUSEA, 200, 0));
+ net.minecraftforge.event.ForgeEventFactory.onLivingConvert(this, p_390698_);
+ }
);
}