the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 25 lines 476 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.entity.ai.navigation.h" 3#include "net.minecraft.world.entity.h" 4#include "net.minecraft.world.level.h" 5#include "RestrictSunGoal.h" 6 7RestrictSunGoal::RestrictSunGoal(PathfinderMob *mob) 8{ 9 this->mob = mob; 10} 11 12bool RestrictSunGoal::canUse() 13{ 14 return mob->level->isDay(); 15} 16 17void RestrictSunGoal::start() 18{ 19 mob->getNavigation()->setAvoidSun(true); 20} 21 22void RestrictSunGoal::stop() 23{ 24 mob->getNavigation()->setAvoidSun(false); 25}