chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -6,40 +6,35 @@
#include "../../Headers/net.minecraft.world.entity.animal.h"
#include "SitGoal.h"
SitGoal::SitGoal(TamableAnimal *mob)
{
_wantToSit = false;
SitGoal::SitGoal(TamableAnimal* mob) {
_wantToSit = false;
this->mob = mob;
setRequiredControlFlags(Control::JumpControlFlag | Control::MoveControlFlag);
this->mob = mob;
setRequiredControlFlags(Control::JumpControlFlag |
Control::MoveControlFlag);
}
bool SitGoal::canUse()
{
if (!mob->isTame()) return false;
if (mob->isInWater()) return false;
if (!mob->onGround) return false;
bool SitGoal::canUse() {
if (!mob->isTame()) return false;
if (mob->isInWater()) return false;
if (!mob->onGround) return false;
std::shared_ptr<Mob> owner = mob->getOwner();
if (owner == NULL) return true; // owner not on level
std::shared_ptr<Mob> owner = mob->getOwner();
if (owner == NULL) return true; // owner not on level
if (mob->distanceToSqr(owner) < FollowOwnerGoal::TeleportDistance * FollowOwnerGoal::TeleportDistance && owner->getLastHurtByMob() != NULL) return false;
if (mob->distanceToSqr(owner) < FollowOwnerGoal::TeleportDistance *
FollowOwnerGoal::TeleportDistance &&
owner->getLastHurtByMob() != NULL)
return false;
return _wantToSit;
return _wantToSit;
}
void SitGoal::start()
{
mob->getNavigation()->stop();
mob->setSitting(true);
void SitGoal::start() {
mob->getNavigation()->stop();
mob->setSitting(true);
}
void SitGoal::stop()
{
mob->setSitting(false);
}
void SitGoal::stop() { mob->setSitting(false); }
void SitGoal::wantToSit(bool _wantToSit)
{
this->_wantToSit = _wantToSit;
}
void SitGoal::wantToSit(bool _wantToSit) { this->_wantToSit = _wantToSit; }