mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Added Entity speed, removed falling damage
This commit is contained in:
parent
b74c089ce7
commit
4bda101ab8
2 changed files with 27 additions and 4 deletions
|
|
@ -344,7 +344,6 @@ class Player{
|
|||
case MC_MOVE_PLAYER:
|
||||
if(is_object($this->entity)){
|
||||
$this->entity->setPosition($data["x"], $data["y"], $data["z"], $data["yaw"], $data["pitch"]);
|
||||
$this->server->api->dhandle("entity.move", $this->entity);
|
||||
}
|
||||
break;
|
||||
case MC_PLAYER_EQUIPMENT:
|
||||
|
|
@ -395,14 +394,16 @@ class Player{
|
|||
$this->server->api->dhandle("entity.animate", array("eid" => $this->eid, "action" => $data["action"]));
|
||||
break;
|
||||
case MC_RESPAWN:
|
||||
$this->entity->invincible = true;
|
||||
$this->entity->setHealth(20, "respawn");
|
||||
$this->entity->setPosition($data["x"], $data["y"], $data["z"], 0, 0);
|
||||
$this->entity->invincible = false;
|
||||
break;
|
||||
case MC_SET_HEALTH:
|
||||
if($this->server->gamemode === 1){
|
||||
break;
|
||||
}
|
||||
$this->entity->setHealth($data["health"], "client");
|
||||
//$this->entity->setHealth($data["health"], "client");
|
||||
break;
|
||||
case MC_DROP_ITEM:
|
||||
$this->server->api->block->drop($this->entity->x, $this->entity->y, $this->entity->z, $data["block"], $data["meta"], $data["stack"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue