Fix Job Spawner

This commit is contained in:
Kam committed 2026-03-09 15:26:39 -04:00
1 parent d2a13d0e66
commit 5700899beb
1 file changed
+15 -5
@@ -47,6 +47,7 @@ public class JobSpawner extends JobInterface {
private EntityLivingBase target;
private boolean isResetting = false;
public JobSpawner(EntityNPCInterface npc) {
super(npc);
@@ -314,16 +315,25 @@ public class JobSpawner extends JobInterface {
@Override
public void reset() {
number = 0;
if (spawned.isEmpty())
spawned = getNearbySpawned();
if (isResetting)
return;
isResetting = true;
try {
number = 0;
if (spawned.isEmpty())
spawned = getNearbySpawned();
target = null;
checkSpawns();
target = null;
checkSpawns();
} finally {
isResetting = false;
}
}
@Override
public void delete() {
if (isResetting)
return;
if (spawnType == 3 && npc.stats.spawnCycle == 3) {
spawnEntity(compound1);
spawnEntity(compound2);