PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){ return ProtocolInfo3::SET_ENTITY_DATA_PACKET; }elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){ return ProtocolInfo4::SET_ENTITY_DATA_PACKET; }elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){ return ProtocolInfo6::SET_ENTITY_DATA_PACKET; }elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){ return ProtocolInfo8::SET_ENTITY_DATA_PACKET; }elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){ return ProtocolInfo12::SET_ENTITY_DATA_PACKET; } return ProtocolInfo::SET_ENTITY_DATA_PACKET; } public function decode(){ } public function encode(){ $this->reset(); $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; } }