TargetFinder

fun interface TargetFinder

A finder for targets for an entity.

Functions

Link copied to clipboard
open fun canUse(): Boolean

If this finder is valid and can be used to find targets.

Link copied to clipboard
abstract fun findTarget(): Entity?

Finds a target for the entity.

Link copied to clipboard
open fun onRemove()

Called when this finder stops being used to find targets.

Link copied to clipboard
open fun onStartUsing()

Called when this finder starts being used to find targets.

Link copied to clipboard
open fun shouldRemove(): Boolean

If this finder should be removed from the finders that can be used to find targets, indicating it is no longer valid and should not be used.