mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
World: do not attempt placement of itemblock if stack size is zero (#4410)
This doesn't make any sense, and also caused a crash.
This commit is contained in:
@@ -1780,12 +1780,11 @@ class World implements ChunkManager{
|
||||
return true;
|
||||
}
|
||||
|
||||
if($item->canBePlaced()){
|
||||
$hand = $item->getBlock($face);
|
||||
$hand->position($this, $blockReplace->getPosition()->x, $blockReplace->getPosition()->y, $blockReplace->getPosition()->z);
|
||||
}else{
|
||||
if($item->isNull() or !$item->canBePlaced()){
|
||||
return false;
|
||||
}
|
||||
$hand = $item->getBlock($face);
|
||||
$hand->position($this, $blockReplace->getPosition()->x, $blockReplace->getPosition()->y, $blockReplace->getPosition()->z);
|
||||
|
||||
if($hand->canBePlacedAt($blockClicked, $clickVector, $face, true)){
|
||||
$blockReplace = $blockClicked;
|
||||
|
Reference in New Issue
Block a user