mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
entity data packets are sent as ordered reliable packets in entity queue, explosions dont send what blocks they exploded in ExplosionPacket
This commit is contained in:
parent
d4036d8ac9
commit
37e2919f46
14 changed files with 166 additions and 136 deletions
|
|
@ -272,7 +272,7 @@ class Arrow extends Entity{
|
|||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class FallingSand extends Entity{
|
|||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$pk->did = -$this->data["Tile"];
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
}
|
||||
|
||||
public function update($now){
|
||||
|
|
|
|||
|
|
@ -54,14 +54,14 @@ class ItemEntity extends Entity{
|
|||
$pk->roll = 0;
|
||||
$pk->item = BlockAPI::getItem($this->itemID, $this->meta, $this->stack);
|
||||
$pk->metadata = $this->getMetadata();
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket();
|
||||
$pk->eid = $this->eid;
|
||||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$player->dataPacket($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -435,14 +435,14 @@ class Minecart extends Vehicle{
|
|||
$pk->z = $this->z;
|
||||
$pk->yaw = $this->yaw;
|
||||
$pk->pitch = $this->pitch;
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket;
|
||||
$pk->eid = $this->eid;
|
||||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$player->dataPacket($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
}
|
||||
|
||||
public function interactWith(Entity $e, $action){
|
||||
|
|
|
|||
|
|
@ -205,6 +205,6 @@ class Painting extends Entity{
|
|||
$pk->z = (int) $this->zPos;
|
||||
$pk->direction = $this->direction;
|
||||
$pk->title = $this->motive;
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,6 @@ class PrimedTNT extends Entity{
|
|||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
$player->entityQueueDataPacket($pk);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue