mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Improved Entity extinguish operations and packet spam
This commit is contained in:
@ -500,7 +500,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->tickChunks();
|
||||
$this->timings->doTickTiles->stopTiming();
|
||||
|
||||
if(($currentTick % 20) === 0){
|
||||
if(($currentTick % 200) === 0){
|
||||
$this->blockCache = [];
|
||||
}
|
||||
|
||||
@ -1409,6 +1409,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
* @param int $id 0-255
|
||||
*/
|
||||
public function setBlockIdAt($x, $y, $z, $id){
|
||||
unset($this->blockCache["$x:$y:$z"]);
|
||||
$this->getChunk($x >> 4, $z >> 4, true)->setBlockId($x & 0x0f, $y & 0x7f, $z & 0x0f, $id & 0xff);
|
||||
}
|
||||
|
||||
@ -1434,6 +1435,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
* @param int $data 0-15
|
||||
*/
|
||||
public function setBlockDataAt($x, $y, $z, $data){
|
||||
unset($this->blockCache["$x:$y:$z"]);
|
||||
$this->getChunk($x >> 4, $z >> 4, true)->setBlockData($x & 0x0f, $y & 0x7f, $z & 0x0f, $data & 0x0f);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user