Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2020-05-17 10:03:17 +01:00
12 changed files with 105 additions and 13 deletions

View File

@ -1909,7 +1909,7 @@ class Level implements ChunkManager, Metadatable{
if($player !== null){
$ev = new BlockPlaceEvent($player, $hand, $blockReplace, $blockClicked, $item);
if($this->checkSpawnProtection($player, $blockClicked)){
if($this->checkSpawnProtection($player, $blockReplace)){
$ev->setCancelled();
}

View File

@ -34,17 +34,26 @@ abstract class LightUpdate{
/** @var ChunkManager */
protected $level;
/** @var int[][] blockhash => [x, y, z, new light level] */
/**
* @var int[][] blockhash => [x, y, z, new light level]
* @phpstan-var array<int, array{int, int, int, int}>
*/
protected $updateNodes = [];
/** @var \SplQueue */
protected $spreadQueue;
/** @var bool[] */
/**
* @var true[]
* @phpstan-var array<int, true>
*/
protected $spreadVisited = [];
/** @var \SplQueue */
protected $removalQueue;
/** @var bool[] */
/**
* @var true[]
* @phpstan-var array<int, true>
*/
protected $removalVisited = [];
/** @var SubChunkIteratorManager */
protected $subChunkHandler;