mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
entity will quit minecraft somewhat correctly now
This commit is contained in:
parent
218a000c41
commit
690e0e6ebd
2 changed files with 8 additions and 0 deletions
|
|
@ -2160,6 +2160,12 @@ class Player{
|
|||
}
|
||||
break;
|
||||
case ProtocolInfo::PLAYER_INPUT_PACKET:
|
||||
if(strlen(bin2hex($packet->buffer)) === 24 && $this->entity->linkedEntity instanceof Entity){
|
||||
$this->entity->linkedEntity->linkEntity($this->entity->linkedEntity, SetEntityLinkPacket::TYPE_RIDE);
|
||||
$this->entity->linkedEntity->linkedEntity = false;
|
||||
$this->entity->linkedEntity = false;
|
||||
}
|
||||
|
||||
break; //TODO player input-
|
||||
default:
|
||||
console("[DEBUG] Unhandled 0x" . dechex($packet->pid()) . " data packet for " . $this->username . " (" . $this->clientID . "): " . print_r($packet, true), true, true, 2);
|
||||
|
|
|
|||
|
|
@ -1272,6 +1272,8 @@ class Entity extends Position
|
|||
public function linkEntity(Entity $e, $type)
|
||||
{
|
||||
//if($e->isPlayer()){
|
||||
$this->linkedEntity = $e;
|
||||
$e->linkedEntity = $this;
|
||||
$this->server->api->dhandle("entity.link", ["rider" => $e->eid, "riding" => $this->eid, "type" => 0]);
|
||||
//}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue