mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Separate block break-info to a separate dynamic unit
This commit is contained in:
@ -42,6 +42,10 @@ class Vine extends Flowable{
|
||||
/** @var bool[] */
|
||||
protected $faces = [];
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){
|
||||
parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.2, BlockToolType::TYPE_AXE));
|
||||
}
|
||||
|
||||
protected function writeStateToMeta() : int{
|
||||
return
|
||||
(isset($this->faces[Facing::SOUTH]) ? self::FLAG_SOUTH : 0) |
|
||||
@ -67,10 +71,6 @@ class Vine extends Flowable{
|
||||
}
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
return 0.2;
|
||||
}
|
||||
|
||||
public function hasEntityCollision() : bool{
|
||||
return true;
|
||||
}
|
||||
@ -193,10 +193,6 @@ class Vine extends Flowable{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getToolType() : int{
|
||||
return BlockToolType::TYPE_AXE;
|
||||
}
|
||||
|
||||
public function getFlameEncouragement() : int{
|
||||
return 15;
|
||||
}
|
||||
|
Reference in New Issue
Block a user