mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Improved Item property handling
This commit is contained in:
@ -31,10 +31,16 @@ use pocketmine\Player;
|
||||
class Bucket extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::BUCKET, $meta, $count, "Bucket");
|
||||
$this->isActivable = true;
|
||||
$this->maxStackSize = 1;
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$targetBlock = Block::get($this->meta);
|
||||
|
||||
|
Reference in New Issue
Block a user