mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +00:00
Block: Clean up internal constructor inconsistencies
I don't dare look how big this commit is or how many bugs it introduced...
This commit is contained in:
@ -32,17 +32,9 @@ use pocketmine\Player;
|
||||
|
||||
class Sugarcane extends Flowable{
|
||||
|
||||
protected $id = self::SUGARCANE_BLOCK;
|
||||
|
||||
protected $itemId = Item::SUGARCANE;
|
||||
|
||||
/** @var int */
|
||||
protected $age = 0;
|
||||
|
||||
public function __construct(){
|
||||
|
||||
}
|
||||
|
||||
protected function writeStateToMeta() : int{
|
||||
return $this->age;
|
||||
}
|
||||
@ -55,10 +47,6 @@ class Sugarcane extends Flowable{
|
||||
return 0b1111;
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
return "Sugarcane";
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
|
||||
if($item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
|
||||
if($this->getSide(Facing::DOWN)->getId() !== self::SUGARCANE_BLOCK){
|
||||
|
Reference in New Issue
Block a user