mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Improved Item property handling
This commit is contained in:
@ -29,9 +29,12 @@ use pocketmine\Player;
|
||||
class Painting extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::PAINTING, 0, $count, "Painting");
|
||||
$this->isActivable = true;
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($target->isTransparent() === false and $face > 1 and $block->isSolid() === false){
|
||||
$faces = [
|
||||
|
Reference in New Issue
Block a user