mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Rename isClearable() to isTransient()
This commit is contained in:
parent
f524467dc9
commit
0c2a4e8df1
2 changed files with 3 additions and 3 deletions
|
@ -250,7 +250,7 @@ public class Npc extends Entity {
|
|||
return (includeBaseDefense ? getBaseDefense(type) : 0) + activeDefenses.getOrDefault(type, 0F);
|
||||
}
|
||||
|
||||
public boolean isClearable() {
|
||||
public boolean isTransient() {
|
||||
return !isGuard();
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ public class EntityManager {
|
|||
|
||||
for(Npc npc : npcs.values()) {
|
||||
if(npc.isDead() || !zone.isChunkLoaded((int)npc.getX(), (int)npc.getY()) ||
|
||||
(!npc.isGuard() && System.currentTimeMillis() > npc.getLastTrackedAt() + ENTITY_CLEAR_TIME)) {
|
||||
(!npc.isTransient() && System.currentTimeMillis() > npc.getLastTrackedAt() + ENTITY_CLEAR_TIME)) {
|
||||
clearableEntities.add(npc);
|
||||
}
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ public class EntityManager {
|
|||
}
|
||||
|
||||
public int getTransientNpcCount() {
|
||||
return (int)(getNpcCount() - getNpcs().stream().filter(npc -> npc.isGuard()).count());
|
||||
return (int)npcs.values().stream().filter(npc -> npc.isTransient()).count();
|
||||
}
|
||||
|
||||
public Collection<Npc> getNpcs() {
|
||||
|
|
Loading…
Add table
Reference in a new issue