From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/NonTameRandomTargetGoal.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Minecraft.World/NonTameRandomTargetGoal.cpp (limited to 'Minecraft.World/NonTameRandomTargetGoal.cpp') diff --git a/Minecraft.World/NonTameRandomTargetGoal.cpp b/Minecraft.World/NonTameRandomTargetGoal.cpp new file mode 100644 index 00000000..734d637f --- /dev/null +++ b/Minecraft.World/NonTameRandomTargetGoal.cpp @@ -0,0 +1,14 @@ +#include "stdafx.h" +#include "net.minecraft.world.entity.animal.h" +#include "NonTameRandomTargetGoal.h" + +NonTameRandomTargetGoal::NonTameRandomTargetGoal(TamableAnimal *mob, const type_info& targetType, float within, int randomInterval, bool mustSee) : NearestAttackableTargetGoal(mob, targetType, within, randomInterval, mustSee) +{ + this->tamableMob = mob; +} + +bool NonTameRandomTargetGoal::canUse() +{ + if (tamableMob->isTame()) return false; + return NearestAttackableTargetGoal::canUse(); +} -- cgit v1.2.3