mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-03-27 06:38:11 +05:00
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -12,7 +12,7 @@ DefendVillageTargetGoal::DefendVillageTargetGoal(VillagerGolem *golem) : TargetG
|
||||
bool DefendVillageTargetGoal::canUse()
|
||||
{
|
||||
shared_ptr<Village> village = golem->getVillage();
|
||||
if (village == nullptr) return false;
|
||||
if (village == NULL) return false;
|
||||
potentialTarget = weak_ptr<LivingEntity>(village->getClosestAggressor(dynamic_pointer_cast<LivingEntity>(golem->shared_from_this())));
|
||||
shared_ptr<LivingEntity> potTarget = potentialTarget.lock();
|
||||
if (!canAttack(potTarget, false))
|
||||
|
||||
Reference in New Issue
Block a user