mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
added entity pushing(disabled by default)
This commit is contained in:
parent
5a059eab71
commit
3c89749125
6 changed files with 73 additions and 16 deletions
|
|
@ -1117,14 +1117,7 @@ class Entity extends Position
|
|||
|
||||
public function setPosition(Vector3 $pos, $yaw = false, $pitch = false)
|
||||
{
|
||||
if($pos instanceof Position and $pos->level instanceof Level and $this->level !== $pos->level){
|
||||
$this->level = $pos->level;
|
||||
$this->server->preparedSQL->entity->setLevel->reset();
|
||||
$this->server->preparedSQL->entity->setLevel->clear();
|
||||
$this->server->preparedSQL->entity->setLevel->bindValue(":level", $this->level->getName(), SQLITE3_TEXT);
|
||||
$this->server->preparedSQL->entity->setLevel->bindValue(":eid", $this->eid, SQLITE3_INTEGER);
|
||||
$this->server->preparedSQL->entity->setLevel->execute();
|
||||
}
|
||||
|
||||
$this->x = $pos->x;
|
||||
$this->y = $pos->y;
|
||||
$this->z = $pos->z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue