102 $oppositeFace =
Facing::opposite($face);
103 $hzFacing = HorizontalFacingOption::tryFromFacing($oppositeFace);
104 if($hzFacing ===
null || !$blockReplace->
getSide($oppositeFace)->isFullCube()){
108 $this->faces = $blockReplace instanceof
Vine ? $blockReplace->faces : [];
109 $this->faces[spl_object_id($hzFacing)] = $hzFacing;
111 return parent::place($tx, $item, $blockReplace, $blockClicked, $face, $clickVector, $player);
117 $up = $this->getSide(Facing::UP);
119 $supportedFaces = $up instanceof
Vine ? array_intersect_key($this->faces, $up->faces) : [];
121 foreach($this->faces as $face){
122 if(!isset($supportedFaces[spl_object_id($face)]) && !$this->getSide($face->toFacing())->isSolid()){
123 unset($this->faces[spl_object_id($face)]);
129 $world = $this->position->getWorld();
130 if(count($this->faces) === 0){
131 $world->useBreakOn($this->position);
133 $world->setBlock($this->position, $this);