mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
Fix for placing blocks where no block exists
This commit is contained in:
parent
000ba5de52
commit
29a5041ef1
@ -183,6 +183,12 @@ class BlockAPI{
|
||||
return false;
|
||||
}
|
||||
$target = $this->server->api->level->getBlock($data["x"], $data["y"], $data["z"]);
|
||||
if($target[0] === 0){ //If no block exists
|
||||
$this->cancelAction($target);
|
||||
$block = $this->server->api->level->getBlockFace($target, $data["face"]);
|
||||
return $this->cancelAction($block);
|
||||
}
|
||||
|
||||
$cancelPlace = false;
|
||||
if(isset(Material::$activable[$target[0]])){
|
||||
switch($target[0]){
|
||||
|
Loading…
x
Reference in New Issue
Block a user