Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
476 B · 25 lines
C++
at main
12345678910111213141516171819202122232425#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);}