mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Explosion performance improvements
This commit is contained in:
parent
8a4ebcc907
commit
2b0ad36e14
5 changed files with 38 additions and 24 deletions
|
|
@ -1278,7 +1278,6 @@ class Player{
|
|||
if(EventHandler::callEvent(new DataPacketReceiveEvent($this, $packet)) === BaseEvent::DENY){
|
||||
return;
|
||||
}
|
||||
|
||||
switch($packet->pid()){
|
||||
case 0x01:
|
||||
break;
|
||||
|
|
@ -1527,9 +1526,11 @@ class Player{
|
|||
}
|
||||
break;
|
||||
case ProtocolInfo::MOVE_PLAYER_PACKET:
|
||||
|
||||
if($this->spawned === false){
|
||||
break;
|
||||
}
|
||||
|
||||
if(($this->entity instanceof Entity) and $packet->messageIndex > $this->lastMovement){
|
||||
$this->lastMovement = $packet->messageIndex;
|
||||
$newPos = new Vector3($packet->x, $packet->y, $packet->z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue