Move attribute net sync to NetworkSession

This commit is contained in:
Dylan K. Taylor
2020-11-08 14:15:11 +00:00
parent 64afb6f2e2
commit f43d20b47a
2 changed files with 8 additions and 7 deletions

View File

@ -1322,13 +1322,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->lastUpdate = $currentTick;
//TODO: move this to network session ticking (this is specifically related to net sync)
$dirtyAttributes = $this->attributeMap->needSend();
$this->networkSession->syncAttributes($this, $dirtyAttributes);
foreach($dirtyAttributes as $attribute){
$attribute->markSynchronized();
}
if(!$this->isAlive() and $this->spawned){
$this->onDeathUpdate($tickDiff);
return true;