mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
0.8.0 partial compatibility
* Not compatible with Creative mode
This commit is contained in:
parent
3d53b9eb3a
commit
ba7c9503d8
5 changed files with 75 additions and 130 deletions
|
|
@ -852,8 +852,9 @@ class Player{
|
|||
"x" => $pos->x,
|
||||
"y" => $pos->y,
|
||||
"z" => $pos->z,
|
||||
"yaw" => $yaw,
|
||||
"bodyYaw" => $yaw,
|
||||
"pitch" => $pitch,
|
||||
"yaw" => $yaw,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -1310,6 +1311,20 @@ class Player{
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case MC_ROTATE_HEAD:
|
||||
if($this->spawned === false){
|
||||
break;
|
||||
}
|
||||
if(($this->entity instanceof Entity)){
|
||||
if($this->blocked === true or $this->server->api->handle("player.move", $this->entity) === false){
|
||||
if($this->lastCorrect instanceof Vector3){
|
||||
$this->teleport($this->lastCorrect, $this->entity->yaw, $this->entity->pitch, false);
|
||||
}
|
||||
}else{
|
||||
$this->entity->setPosition($this->entity, $data["yaw"], $data["pitch"]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MC_MOVE_PLAYER:
|
||||
if($this->spawned === false){
|
||||
break;
|
||||
|
|
@ -1340,7 +1355,6 @@ class Player{
|
|||
if($this->spawned === false){
|
||||
break;
|
||||
}
|
||||
|
||||
$data["eid"] = $this->eid;
|
||||
$data["player"] = $this;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue