isActivable = true; if(($this->meta & 0x04) === 0x04){ $this->isFullBlock = true; } else{ $this->isFullBlock = false; } $this->hardness = 15; } public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ $faces = array( 0 => 3, 1 => 0, 2 => 1, 3 => 2, ); $this->meta = $faces[$player->getDirection()] & 0x03; $this->level->setBlock($block, $this, true, false, true); return true; } public function getDrops(Item $item, Player $player){ return array( array($this->id, 0, 1), ); } public function onActivate(Item $item, Player $player){ $faces = array( 0 => 3, 1 => 0, 2 => 1, 3 => 2, ); $this->meta = ($faces[$player->getDirection()] & 0x03) | ((~$this->meta) & 0x04); if(($this->meta & 0x04) === 0x04){ $this->isFullBlock = true; } else{ $this->isFullBlock = false; } $this->level->setBlock($this, $this, true, false, true); return true; } }