mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 13:37:58 +01:00
Reduce chance of mobs reproducing when they have the corrupt influence effect. Fixes #467
This commit is contained in:
parent
36a8a9d018
commit
c7a0c7b527
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
CorruptInfluenceStatusEffect.reproduce(mob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,9 @@ public class CorruptInfluenceStatusEffect extends StatusEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mob.getRandom().nextInt(4) != 0) {
|
||||||
|
clone.clearStatusEffects();
|
||||||
|
}
|
||||||
mob.getWorld().spawnEntity(clone);
|
mob.getWorld().spawnEntity(clone);
|
||||||
|
|
||||||
if (!mob.isSilent()) {
|
if (!mob.isSilent()) {
|
||||||
|
|
Loading…
Reference in a new issue