Ice trolls can now attack the miner NPCs.

Removed debug code from the packet write queue
This commit is contained in:
ceikry
2021-07-09 20:14:37 -05:00
parent 3534da208a
commit fd5d5e7e70
3 changed files with 44 additions and 1 deletions
+10
View File
@@ -593,6 +593,16 @@ object ContentAPI {
return RegionManager.getLocalNpcs(entity).firstOrNull { it.id == id }
}
/**
* Gets a list of nearby NPCs that match the given IDs.
* @param entity the entity to check around
* @param ids the IDs of the NPCs to look for
*/
@JvmStatic
fun findLocalNPCs(entity: Entity, ids: IntArray): List<NPC>{
return RegionManager.getSurroundingNPCs(entity).filter { it.id in ids }.toList()
}
/**
* Gets the value of an attribute key from the Entity's attributes store
* @param entity the entity to get the attribute from