mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 19:55: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,12 +2054,12 @@ class World implements ChunkManager{
|
|||||||
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
||||||
$listener->onChunkLoaded($chunk);
|
$listener->onChunkLoaded($chunk);
|
||||||
}
|
}
|
||||||
}
|
}else{
|
||||||
|
|
||||||
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
foreach($this->getChunkListeners($chunkX, $chunkZ) as $listener){
|
||||||
$listener->onChunkChanged($chunk);
|
$listener->onChunkChanged($chunk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the highest block Y value at a specific $x and $z
|
* Gets the highest block Y value at a specific $x and $z
|
||||||
|
Loading…
x
Reference in New Issue
Block a user