Refactored some fishing code

Converted some fishing code to kotlin
Implemented crayfish fishing
This commit is contained in:
bushtail
2023-04-01 04:57:58 +00:00
committed by Ryan
parent 2273550fea
commit af99895168
15 changed files with 672 additions and 647 deletions
+11
View File
@@ -814,6 +814,17 @@ fun findLocalNPC(entity: Entity, id: Int): NPC? {
return RegionManager.getLocalNpcs(entity).firstOrNull { it.id == id }
}
/**
* Gets an NPC with the given ID in the same general area as the given Entity
* @param location The location to search around.
* @param distance The maximum distance to the entity.
* @returns an NPC matching the given ID or null if none is found
*/
fun findLocalNPCs(location: Location, distance: Int): MutableList<NPC> {
return RegionManager.getLocalNpcs(location, distance)
}
/**
* Gets a list of nearby NPCs that match the given IDs.
* @param entity the entity to check around