Further cleanup to general AABB handling

This commit is contained in:
Dylan K. Taylor
2018-11-24 19:17:03 +00:00
parent d5ae4ad141
commit b2201c8c59
25 changed files with 36 additions and 58 deletions

View File

@ -1546,7 +1546,7 @@ class Level implements ChunkManager, Metadatable{
$ev = new BlockUpdateEvent($block);
$ev->call();
if(!$ev->isCancelled()){
foreach($this->getNearbyEntities(new AxisAlignedBB($block->x - 1, $block->y - 1, $block->z - 1, $block->x + 2, $block->y + 2, $block->z + 2)) as $entity){
foreach($this->getNearbyEntities(AxisAlignedBB::one()->offset($block->x, $block->y, $block->z)->expand(1, 1, 1)) as $entity){
$entity->onNearbyBlockChange();
}
$ev->getBlock()->onNearbyBlockChange();