mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
@ -60,6 +60,7 @@ use pocketmine\item\StringToItemParser;
|
||||
use pocketmine\item\VanillaItems;
|
||||
use pocketmine\lang\KnownTranslationFactory;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\tag\IntTag;
|
||||
use pocketmine\nbt\tag\StringTag;
|
||||
@ -1994,6 +1995,10 @@ class World implements ChunkManager{
|
||||
|
||||
if($hand->canBePlacedAt($blockClicked, $clickVector, $face, true)){
|
||||
$blockReplace = $blockClicked;
|
||||
//TODO: while this mimics the vanilla behaviour with replaceable blocks, we should really pass some other
|
||||
//value like NULL and let place() deal with it. This will look like a bug to anyone who doesn't know about
|
||||
//the vanilla behaviour.
|
||||
$face = Facing::UP;
|
||||
$hand->position($this, $blockReplace->getPosition()->x, $blockReplace->getPosition()->y, $blockReplace->getPosition()->z);
|
||||
}elseif(!$hand->canBePlacedAt($blockReplace, $clickVector, $face, false)){
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user