mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-18 02:38:10 +00:00
refactor: remove heap-allocated AABBs
This commit is contained in:
@@ -55,10 +55,9 @@ bool NearestAttackableTargetGoal::canUse() {
|
||||
return false;
|
||||
double within = getFollowDistance();
|
||||
|
||||
AABB mob_bb = mob->bb->grow(within, 4, within);
|
||||
AABB mob_bb = mob->bb.grow(within, 4, within);
|
||||
std::vector<std::shared_ptr<Entity> >* entities =
|
||||
mob->level->getEntitiesOfClass(
|
||||
targetType, &mob_bb, selector);
|
||||
mob->level->getEntitiesOfClass(targetType, &mob_bb, selector);
|
||||
|
||||
bool result = false;
|
||||
if (entities != NULL && !entities->empty()) {
|
||||
|
||||
Reference in New Issue
Block a user