Make CocoaBlock Flowable (#6218)

This commit is contained in:
IvanCraft623 2024-02-05 07:36:09 -05:00 committed by GitHub
parent c7c20d4d79
commit f207d1bbf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,6 @@ namespace pocketmine\block;
use pocketmine\block\utils\AgeableTrait; use pocketmine\block\utils\AgeableTrait;
use pocketmine\block\utils\BlockEventHelper; use pocketmine\block\utils\BlockEventHelper;
use pocketmine\block\utils\HorizontalFacingTrait; use pocketmine\block\utils\HorizontalFacingTrait;
use pocketmine\block\utils\SupportType;
use pocketmine\block\utils\WoodType; use pocketmine\block\utils\WoodType;
use pocketmine\data\runtime\RuntimeDataDescriber; use pocketmine\data\runtime\RuntimeDataDescriber;
use pocketmine\item\Fertilizer; use pocketmine\item\Fertilizer;
@ -40,7 +39,7 @@ use pocketmine\player\Player;
use pocketmine\world\BlockTransaction; use pocketmine\world\BlockTransaction;
use function mt_rand; use function mt_rand;
class CocoaBlock extends Transparent{ class CocoaBlock extends Flowable{
use HorizontalFacingTrait; use HorizontalFacingTrait;
use AgeableTrait; use AgeableTrait;
@ -65,10 +64,6 @@ class CocoaBlock extends Transparent{
]; ];
} }
public function getSupportType(int $facing) : SupportType{
return SupportType::NONE;
}
private function canAttachTo(Block $block) : bool{ private function canAttachTo(Block $block) : bool{
return $block instanceof Wood && $block->getWoodType() === WoodType::JUNGLE; return $block instanceof Wood && $block->getWoodType() === WoodType::JUNGLE;
} }