v0.6.2: enemy spawner now only counts hostile mobs for the total
This commit is contained in:
parent
30e021f8d5
commit
66765800cf
|
@ -503,7 +503,12 @@ public abstract class Level implements Bundlable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
if (mobs.size() < nMobs()) {
|
int count = 0;
|
||||||
|
for (Mob mob : mobs.toArray(new Mob[0])){
|
||||||
|
if (mob.hostile) count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count < nMobs()) {
|
||||||
|
|
||||||
Mob mob = createMob();
|
Mob mob = createMob();
|
||||||
mob.state = mob.WANDERING;
|
mob.state = mob.WANDERING;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user