World: call nearby entities' onNearbyBlockChange() in setChunk()

fixes #2779 in all known cases.
This commit is contained in:
Dylan K. Taylor 2021-10-28 23:59:32 +01:00
parent eb75df6f8e
commit a4eda9a8f5
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -2177,6 +2177,14 @@ class World implements ChunkManager{
$listener->onChunkChanged($chunkX, $chunkZ, $chunk);
}
}
for($cX = -1; $cX <= 1; ++$cX){
for($cZ = -1; $cZ <= 1; ++$cZ){
foreach($this->getChunkEntities($chunkX + $cX, $chunkZ + $cZ) as $entity){
$entity->onNearbyBlockChange();
}
}
}
}
/**