mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Merge branch 'stable'
This commit is contained in:
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user