mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 15:36:08 +00:00
Fixed #39 placing blocks inside an entity
This commit is contained in:
@@ -391,8 +391,16 @@ class BlockAPI{
|
||||
}else{
|
||||
return $this->cancelAction($block);
|
||||
}
|
||||
$entity = $this->server->api->entity->get($data["eid"]);
|
||||
if(($entity instanceof Entity) !== true){
|
||||
return $this->cancelAction($block); //No Entity WTF?
|
||||
}
|
||||
|
||||
if($entity->inBlock($block[2][0], $block[2][1], $block[2][2])){
|
||||
return $this->cancelAction($block); //Entity in block
|
||||
}
|
||||
|
||||
$direction = $this->server->api->entity->get($data["eid"])->getDirection();
|
||||
$direction = $entity->getDirection();
|
||||
|
||||
switch($data["block"]){
|
||||
case 6:
|
||||
|
Reference in New Issue
Block a user