mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +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;
|
return false;
|
||||||
}
|
}
|
||||||
$target = $this->server->api->level->getBlock($data["x"], $data["y"], $data["z"]);
|
$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;
|
$cancelPlace = false;
|
||||||
if(isset(Material::$activable[$target[0]])){
|
if(isset(Material::$activable[$target[0]])){
|
||||||
switch($target[0]){
|
switch($target[0]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user