mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 03:35:33 +00:00
World: do not fire ChunkListener->onChunkChanged() when a new chunk is set
the documentation expressly describes a chunk being _replaced_ by a new chunk. This doesn't fit when the chunk didn't exist to begin with.
This commit is contained in:
parent
74744fd498
commit
fa9be2477d
@ -2054,10 +2054,10 @@ class World implements ChunkManager{
|
||||
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
||||
$listener->onChunkLoaded($chunk);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
||||
$listener->onChunkChanged($chunk);
|
||||
}else{
|
||||
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
||||
$listener->onChunkChanged($chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user