mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Possible fix for #2061
This commit is contained in:
parent
bb34e06754
commit
8940360df4
@ -880,6 +880,10 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
$pos = new Position($pos->x, $pos->y, $pos->z, $this);
|
$pos = new Position($pos->x, $pos->y, $pos->z, $this);
|
||||||
}
|
}
|
||||||
$block->position($pos);
|
$block->position($pos);
|
||||||
|
$index = Level::chunkHash($pos->x >> 4, $pos->z >> 4);
|
||||||
|
if(ADVANCED_CACHE == true){
|
||||||
|
Cache::remove("world:" . $this->getID() . ":" . $index);
|
||||||
|
}
|
||||||
|
|
||||||
if($direct === true){
|
if($direct === true){
|
||||||
$pk = new UpdateBlockPacket;
|
$pk = new UpdateBlockPacket;
|
||||||
@ -898,10 +902,6 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
$pos = new Position($pos->x, $pos->y, $pos->z, $this);
|
$pos = new Position($pos->x, $pos->y, $pos->z, $this);
|
||||||
}
|
}
|
||||||
$block->position($pos);
|
$block->position($pos);
|
||||||
$index = Level::chunkHash($pos->x >> 4, $pos->z >> 4);
|
|
||||||
if(ADVANCED_CACHE == true){
|
|
||||||
Cache::remove("world:{$this->getID()}:{$index}");
|
|
||||||
}
|
|
||||||
if(!isset($this->changedBlocks[$index])){
|
if(!isset($this->changedBlocks[$index])){
|
||||||
$this->changedBlocks[$index] = [];
|
$this->changedBlocks[$index] = [];
|
||||||
$this->changedCount[$index] = 0;
|
$this->changedCount[$index] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user