Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/noppes/npcs/VersionCompatibility.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound

compound.setIntArray("StartPosNew", new int[]{x, y, z});
}

if (compound.hasKey("SpawnerDoesntDie") && !compound.hasKey("DespawnOnTargetLost")) {
compound.setBoolean("DespawnOnTargetLost", true);
}
}
if (npc.npcVersion == 13) {
boolean bo = compound.getBoolean("HealthRegen");
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/noppes/npcs/roles/JobSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ public void setJobCompound(int i, NBTTagCompound compound) {

@Override
public void aiUpdateTask() {
if (spawned.isEmpty()) {
spawned = getNearbySpawned();
}

if (spawned.isEmpty()) {
if (spawnType == 0) {
if (spawnEntity(number + 1) == null && !doesntDie)
Expand Down
Loading