mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +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:
parent
d9b9aed2cc
commit
ee16a00c57
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user