Interface FindNearestAttackableTargetGoal

    • Method Detail

      • targetClass

        java.lang.Class<? extends Living> targetClass()
        Gets the entity class that can be targeted.
        Returns:
        The entity class that can be targeted
      • setTargetClass

        FindNearestAttackableTargetGoal setTargetClass​(java.lang.Class<? extends Living> targetClass)
        Sets the entity class that can be targeted.
        Parameters:
        targetClass - The entity class to target
        Returns:
        This task, for chaining
      • chance

        int chance()
        Gets the chance that this task will go through and attempt to find a new target.
        Returns:
        The chance that this task will go through and find a target
      • setChance

        FindNearestAttackableTargetGoal setChance​(int chance)
        Sets the chance that this task will go through and attempt to find a new target.
        Parameters:
        chance - The chance that this task will attemp to find a new target
        Returns:
        This task, for chaining
      • filter

        FindNearestAttackableTargetGoal filter​(java.util.function.Predicate<Living> predicate)
        Sets the Predicate filter to determine whether a Living entity can be targeted.
        Parameters:
        predicate - The predicate
        Returns:
        This task, for chaining
      • filter

        java.util.function.Predicate<Living> filter()
        Gets the Predicate filter to determine whether a living entity can be targeted.
        Returns:
        The predicate to filter living entities for targeting