block: eliminate suspicious usages of $blockClicked in place()

This commit is contained in:
Dylan K. Taylor
2023-01-12 20:35:26 +00:00
parent 4e9c3e101d
commit e26c8b9e9f
7 changed files with 8 additions and 18 deletions

View File

@ -77,7 +77,7 @@ class Torch extends Flowable{
if($blockClicked->canBeReplaced() && $this->canBeSupportedBy($blockClicked->getSide(Facing::DOWN), Facing::UP)){
$this->facing = Facing::UP;
return parent::place($tx, $item, $blockReplace, $blockClicked, $face, $clickVector, $player);
}elseif($face !== Facing::DOWN && $this->canBeSupportedBy($blockClicked, $face)){
}elseif($face !== Facing::DOWN && $this->canBeSupportedBy($blockReplace->getSide(Facing::opposite($face)), $face)){
$this->facing = $face;
return parent::place($tx, $item, $blockReplace, $blockClicked, $face, $clickVector, $player);
}else{