mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Fixed backwards compatibility issue on PlayerInteractyEvent
This commit is contained in:
parent
a7b1c6e086
commit
5d102c2ede
@ -1155,9 +1155,9 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$pk->x = $from->x;
|
$pk->x = $from->x;
|
||||||
$pk->y = $from->y + $this->getEyeHeight();
|
$pk->y = $from->y + $this->getEyeHeight();
|
||||||
$pk->z = $from->z;
|
$pk->z = $from->z;
|
||||||
|
$pk->yaw = $from->yaw;
|
||||||
$pk->bodyYaw = $from->yaw;
|
$pk->bodyYaw = $from->yaw;
|
||||||
$pk->pitch = $from->pitch;
|
$pk->pitch = $from->pitch;
|
||||||
$pk->yaw = $from->yaw;
|
|
||||||
$pk->mode = 1;
|
$pk->mode = 1;
|
||||||
$this->directDataPacket($pk);
|
$this->directDataPacket($pk);
|
||||||
$this->forceMovement = new Vector3($from->x, $from->y, $from->z);
|
$this->forceMovement = new Vector3($from->x, $from->y, $from->z);
|
||||||
|
@ -61,7 +61,7 @@ class PlayerInteractEvent extends PlayerEvent implements Cancellable{
|
|||||||
$this->touchVector = new Vector3(0, 0, 0);
|
$this->touchVector = new Vector3(0, 0, 0);
|
||||||
}else{
|
}else{
|
||||||
$this->touchVector = $block;
|
$this->touchVector = $block;
|
||||||
Block::get(0, 0, new Position(0, 0, 0, $player->level));
|
$this->blockTouched = Block::get(0, 0, new Position(0, 0, 0, $player->level));
|
||||||
}
|
}
|
||||||
$this->player = $player;
|
$this->player = $player;
|
||||||
$this->item = $item;
|
$this->item = $item;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user