mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
better(?) way to handle eid translation, local eid 0 is not used now, some additional fixes
This commit is contained in:
parent
62819f8b12
commit
21f8796e89
32 changed files with 345 additions and 56 deletions
|
|
@ -17,5 +17,13 @@ class SetEntityDataPacket extends RakNetDataPacket{
|
|||
$this->putInt($this->eid);
|
||||
$this->put(Utils::writeMetadata($this->metadata));
|
||||
}
|
||||
public function eidsToLocal(Player $p){
|
||||
if(!$this->localEids){
|
||||
$this->localEids = true;
|
||||
$this->eid = $p->global2localEID[$this->eid] ?? false;
|
||||
if($this->eid === false) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue