mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
World: call nearby entities' onNearbyBlockChange() in setChunk()
fixes #2779 in all known cases.
This commit is contained in:
parent
eb75df6f8e
commit
a4eda9a8f5
@ -2177,6 +2177,14 @@ class World implements ChunkManager{
|
|||||||
$listener->onChunkChanged($chunkX, $chunkZ, $chunk);
|
$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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user