Reduce chance of mobs reproducing when they have the corrupt influence effect. Fixes #467

This commit is contained in:
Sollace 2024-09-24 15:52:19 +01:00
parent 36a8a9d018
commit c7a0c7b527
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 4 additions and 1 deletions

View file

@ -381,7 +381,7 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
}
}
if (entity instanceof HostileEntity mob && mob.hasStatusEffect(UEffects.CORRUPT_INFLUENCE) && mob.getRandom().nextInt(4) == 0) {
if (entity instanceof HostileEntity mob && mob.hasStatusEffect(UEffects.CORRUPT_INFLUENCE) && mob.getRandom().nextInt(4000) == 0) {
CorruptInfluenceStatusEffect.reproduce(mob);
}

View file

@ -89,6 +89,9 @@ public class CorruptInfluenceStatusEffect extends StatusEffect {
}
}
if (mob.getRandom().nextInt(4) != 0) {
clone.clearStatusEffects();
}
mob.getWorld().spawnEntity(clone);
if (!mob.isSilent()) {