mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 05:43:38 +00:00
13 lines
529 B
C++
13 lines
529 B
C++
#include "../../Platform/stdafx.h"
|
|
#include "../../Headers/net.minecraft.world.entity.ai.navigation.h"
|
|
#include "../../Headers/net.minecraft.world.entity.h"
|
|
#include "../../Headers/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); } |