v3.1.0: adjusted ebony mimic spawning slightly to prevent a rare crash

This commit is contained in:
Evan Debenham
2025-05-20 14:22:45 -04:00
parent 0db59e92cf
commit b95607ead0

View File

@@ -656,8 +656,10 @@ public abstract class RegularLevel extends Level {
candidateCells.add(h.pos); candidateCells.add(h.pos);
} }
} }
} else { }
if (Random.Int(5) == 0 && findMob(exit()) == null){
if (candidateCells.isEmpty()) {
if (Random.Int(5) == 0 && findMob(exit()) == null) {
candidateCells.add(exit()); candidateCells.add(exit());
} else { } else {
for (int i = 0; i < length(); i++) { for (int i = 0; i < length(); i++) {