mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
more packets will be always sent to the client
This commit is contained in:
parent
5458c04983
commit
fe07ec81ee
13 changed files with 85 additions and 68 deletions
|
|
@ -272,7 +272,7 @@ class Arrow extends Entity{
|
|||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$player->dataPacket($pk);
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,20 @@ class FallingSand extends Entity{
|
|||
public function isPickable(){
|
||||
return !$this->dead;
|
||||
}
|
||||
public function spawn($player)
|
||||
{
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->eid;
|
||||
$pk->type = $this->type;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$pk->did = -$this->data["Tile"];
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
}
|
||||
|
||||
public function update($now){
|
||||
if($this->closed) return;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ItemEntity extends Entity{
|
|||
$pk->roll = 0;
|
||||
$pk->item = BlockAPI::getItem($this->itemID, $this->meta, $this->stack);
|
||||
$pk->metadata = $this->getMetadata();
|
||||
$player->dataPacket($pk);
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket();
|
||||
$pk->eid = $this->eid;
|
||||
|
|
|
|||
|
|
@ -435,8 +435,8 @@ class Minecart extends Vehicle{
|
|||
$pk->z = $this->z;
|
||||
$pk->yaw = $this->yaw;
|
||||
$pk->pitch = $this->pitch;
|
||||
$player->dataPacket($pk);
|
||||
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket;
|
||||
$pk->eid = $this->eid;
|
||||
$pk->speedX = $this->speedX;
|
||||
|
|
|
|||
|
|
@ -205,6 +205,6 @@ class Painting extends Entity{
|
|||
$pk->z = (int) $this->zPos;
|
||||
$pk->direction = $this->direction;
|
||||
$pk->title = $this->motive;
|
||||
$player->dataPacket($pk);
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,6 @@ class PrimedTNT extends Entity{
|
|||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$player->dataPacket($pk);
|
||||
$player->dataPacketAlwaysRecover($pk);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue