mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Revert "World: specialize nearby entity updating for block updates"
This reverts commit 128eb500eb
.
This breaks when entities in neighbouring chunks overlap into the
current chunk without actually being tracked by it.
Perhaps it might be worth having entities tracked by all chunks their
AABB touches in the future, so that we don't have to check padding
chunks and waste CPU time.
This commit is contained in:
@ -986,11 +986,8 @@ class World implements ChunkManager{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$cellAABB = AxisAlignedBB::one()->offset($x, $y, $z);
|
||||
foreach($this->getChunkEntities($x >> Chunk::COORD_BIT_SIZE, $z >> Chunk::COORD_BIT_SIZE) as $entity){
|
||||
if($entity->getBoundingBox()->intersectsWith($cellAABB)){
|
||||
$entity->onNearbyBlockChange();
|
||||
}
|
||||
foreach($this->getNearbyEntities(AxisAlignedBB::one()->offset($x, $y, $z)) as $entity){
|
||||
$entity->onNearbyBlockChange();
|
||||
}
|
||||
$block->onNearbyBlockChange();
|
||||
}
|
||||
|
Reference in New Issue
Block a user