mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Revert "World: specialize nearby entity updating for block updates"
This reverts commit 128eb500ebee5163583b84640a9c4f28c0218d42. 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:
parent
128eb500eb
commit
538b698a00
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user