Files
MinecraftConsoles/Minecraft.World/MoveThroughVillageGoal.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

32 lines
651 B
C++

#pragma once
#include "Goal.h"
class PathfinderMob;
class Path;
class DoorInfo;
class MoveThroughVillageGoal : public Goal
{
private:
PathfinderMob *mob;
float speed;
Path *path;
weak_ptr<DoorInfo> doorInfo;
bool onlyAtNight;
vector< weak_ptr<DoorInfo> > visited;
public:
MoveThroughVillageGoal(PathfinderMob *mob, float speed, bool onlyAtNight);
~MoveThroughVillageGoal();
virtual bool canUse();
virtual bool canContinueToUse();
virtual void start();
virtual void stop();
private:
std::shared_ptr<DoorInfo> getNextDoorInfo(std::shared_ptr<Village> village);
bool hasVisited(std::shared_ptr<DoorInfo> di);
void updateVisited();
};