Candle: Fix support type (#5422)

This commit is contained in:
ipad54 2022-11-21 17:38:18 +03:00 committed by GitHub
parent 858d3dce8e
commit 1bc5e225ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\block\utils\CandleTrait;
use pocketmine\block\utils\SupportType;
use pocketmine\data\runtime\RuntimeDataReader;
use pocketmine\data\runtime\RuntimeDataWriter;
use pocketmine\item\Item;
@ -94,6 +95,10 @@ class Candle extends Transparent{
];
}
public function getSupportType(int $facing) : SupportType{
return SupportType::NONE();
}
protected function getCandleIfCompatibleType(Block $block) : ?Candle{
return $block instanceof Candle && $block->isSameType($this) ? $block : null;
}