mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-04-06 07:23:39 +00:00
the whole game
This commit is contained in:
65
src/world/entity/PathfinderMob.h
Executable file
65
src/world/entity/PathfinderMob.h
Executable file
@@ -0,0 +1,65 @@
|
||||
#ifndef NET_MINECRAFT_WORLD_ENTITY__PathfinderMob_H__
|
||||
#define NET_MINECRAFT_WORLD_ENTITY__PathfinderMob_H__
|
||||
|
||||
//package net.minecraft.world.entity;
|
||||
|
||||
#include "Mob.h"
|
||||
#include "ai/PathNavigation.h"
|
||||
#include "../level/pathfinder/Path.h"
|
||||
|
||||
class Level;
|
||||
class Sensing;
|
||||
|
||||
typedef struct AIData {
|
||||
AIData():
|
||||
target(NULL)
|
||||
{}
|
||||
|
||||
Mob* target;
|
||||
} AIData;
|
||||
|
||||
class PathfinderMob: public Mob
|
||||
{
|
||||
typedef Mob super;
|
||||
static const int MAX_TURN = 30;
|
||||
public:
|
||||
PathfinderMob(Level* level);
|
||||
~PathfinderMob();
|
||||
|
||||
bool canSpawn();
|
||||
|
||||
bool isPathFinding();
|
||||
void setPath(Path& path);
|
||||
|
||||
virtual Entity* getAttackTarget();
|
||||
virtual void setAttackTarget(Entity* attacker);
|
||||
|
||||
virtual float getWalkTargetValue(int x, int y, int z);
|
||||
int getNoActionTime();
|
||||
|
||||
PathNavigation* getNavigation();
|
||||
protected:
|
||||
virtual Entity* findAttackTarget();
|
||||
|
||||
virtual void checkHurtTarget(Entity* target, float d);
|
||||
virtual void checkCantSeeTarget(Entity* target, float d);
|
||||
|
||||
virtual float getWalkingSpeedModifier();
|
||||
|
||||
virtual bool shouldHoldGround();
|
||||
|
||||
void updateAi();
|
||||
|
||||
virtual void findRandomStrollLocation();
|
||||
int attackTargetId;
|
||||
bool holdGround;
|
||||
int fleeTime;
|
||||
public:
|
||||
static const int CAN_OPEN_DOORS = 1;
|
||||
static const int AVOID_WATER = 2;
|
||||
//int pathfinderMask;
|
||||
private:
|
||||
Path path;
|
||||
};
|
||||
|
||||
#endif /*NET_MINECRAFT_WORLD_ENTITY__PathfinderMob_H__*/
|
||||
Reference in New Issue
Block a user