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 ad51be7620
commit 20c9b6f42d
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()) {