mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-30 13:32:58 +00:00
16 lines
535 B
C++
16 lines
535 B
C++
#include "NonTameRandomTargetGoal.h"
|
|
|
|
#include "minecraft/world/entity/TamableAnimal.h"
|
|
#include "minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.h"
|
|
|
|
NonTameRandomTargetGoal::NonTameRandomTargetGoal(
|
|
TamableAnimal* mob, const std::type_info& targetType, int randomInterval,
|
|
bool mustSee)
|
|
: NearestAttackableTargetGoal(mob, targetType, randomInterval, mustSee) {
|
|
tamableMob = mob;
|
|
}
|
|
|
|
bool NonTameRandomTargetGoal::canUse() {
|
|
return !tamableMob->isTame() && NearestAttackableTargetGoal::canUse();
|
|
}
|