Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor
2020-02-07 18:13:55 +00:00
88 changed files with 543 additions and 283 deletions

View File

@ -61,14 +61,14 @@ use function min;
*/
class BlockFactory{
/** @var \SplFixedArray|Block[] */
private static $fullList = null;
private static $fullList;
/** @var \SplFixedArray|int[] */
public static $lightFilter = null;
public static $lightFilter;
/** @var \SplFixedArray|bool[] */
public static $diffusesSkyLight = null;
public static $diffusesSkyLight;
/** @var \SplFixedArray|float[] */
public static $blastResistance = null;
public static $blastResistance;
/**
* Initializes the block factory. By default this is called only once on server start, however you may wish to use

View File

@ -124,7 +124,7 @@ class Leaves extends Transparent{
}
public function getDrops(Item $item) : array{
if($item->getBlockToolType() & BlockToolType::SHEARS){
if(($item->getBlockToolType() & BlockToolType::SHEARS) !== 0){
return $this->getDropsForCompatibleTool($item);
}

View File

@ -155,7 +155,7 @@ class Sign extends Transparent{
throw new \UnexpectedValueException($author->getName() . " tried to write $size bytes of text onto a sign (bigger than max 1000)");
}
$removeFormat = $author->getRemoveFormat();
$ev = new SignChangeEvent($this, $author, new SignText(array_map(function(string $line) use ($removeFormat){
$ev = new SignChangeEvent($this, $author, new SignText(array_map(function(string $line) use ($removeFormat) : string{
return TextFormat::clean($line, $removeFormat);
}, $text->getLines())));
$ev->call();

View File

@ -130,7 +130,7 @@ class Vine extends Flowable{
}
public function getDrops(Item $item) : array{
if($item->getBlockToolType() & BlockToolType::SHEARS){
if(($item->getBlockToolType() & BlockToolType::SHEARS) !== 0){
return $this->getDropsForCompatibleTool($item);
}