blob: b845c53f8db41cc5929194de3290f10c6a7500a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "stdafx.h"
#include "net.minecraft.world.entity.ai.navigation.h"
#include "net.minecraft.world.entity.h"
#include "net.minecraft.world.level.h"
#include "RestrictSunGoal.h"
RestrictSunGoal::RestrictSunGoal(PathfinderMob *mob)
{
this->mob = mob;
}
bool RestrictSunGoal::canUse()
{
return mob->level->isDay();
}
void RestrictSunGoal::start()
{
mob->getNavigation()->setAvoidSun(true);
}
void RestrictSunGoal::stop()
{
mob->getNavigation()->setAvoidSun(false);
}
|