replaced more stuff with entity queue, added a limit to how many packets can be resent per tick

This commit is contained in:
GameHerobrine 2025-06-29 11:44:39 +03:00
parent 21f8796e89
commit 6d10cfd896
7 changed files with 31 additions and 24 deletions

View file

@ -47,16 +47,6 @@ class Arrow extends Entity{
$data["shotByPlayer"] = $this->shotByPlayer;
return $data;
}
public function handleUpdate(){
$pk = new MoveEntityPacket_PosRot;
$pk->eid = $this->eid;
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$this->server->api->player->broadcastPacket($this->level->players, $pk);
}
public function shoot($d, $d1, $d2, $f, $f1){ //original name from 0.8.1 IDA decompilation, var names are taken from b1.7.3
$f2 = sqrt($d * $d + $d1 * $d1 + $d2 * $d2);