mirror of
https://github.com/Patoke/LCERenewed.git
synced 2026-10-13 00:25:11 +00:00
feat: init
This commit is contained in:
commit
25809b8455
18807 files changed
+3944357
No files matched your search
@@ -0,0 +1,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);
|
||||
}
|
||||
Reference in new issue
Block a user