This commit is contained in:
GameHerobrine 2025-10-17 04:11:42 +03:00
parent 20298d60fd
commit acd55cce96
2 changed files with 8 additions and 15 deletions

View file

@ -51,18 +51,11 @@ class ItemEntity extends Entity{
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$pk->roll = 0;
$pk->item = BlockAPI::getItem($this->itemID, $this->meta, $this->stack);
$pk->metadata = $this->getMetadata();
$player->entityQueueDataPacket($pk);
$pk = new SetEntityMotionPacket();
$pk->eid = $this->eid;
$pk->speedX = $this->speedX;
$pk->speedY = $this->speedY;
$pk->speedZ = $this->speedZ;
$pk->item = BlockAPI::getItem($this->itemID, $this->meta, $this->stack);
$pk->metadata = $this->getMetadata();
$player->entityQueueDataPacket($pk);
$this->sendLinkPackets($player);
return true;

View file

@ -6,9 +6,9 @@ class AddItemEntityPacket extends RakNetDataPacket{
public $x;
public $y;
public $z;
public $yaw;
public $pitch;
public $roll;
public $speedX;
public $speedY;
public $speedZ;
public function pid(){
return ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
@ -25,9 +25,9 @@ class AddItemEntityPacket extends RakNetDataPacket{
$this->putFloat($this->x);
$this->putFloat($this->y);
$this->putFloat($this->z);
$this->putByte($this->yaw);
$this->putByte($this->pitch);
$this->putByte($this->roll);
$this->putByte((int)($this->speedX * 128));
$this->putByte((int)($this->speedY * 128));
$this->putByte((int)($this->speedZ * 128));
}
public function eidsToLocal(Player $p){
if(!$this->localEids){