mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed #39 placing blocks inside an entity
This commit is contained in:
parent
4bda101ab8
commit
e4d71949e3
3 changed files with 21 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue