mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Oops, these fields need to be filled
This commit is contained in:
parent
092cc2750f
commit
04668d534d
@ -37,14 +37,15 @@ abstract class ContainerInventory extends BaseInventory{
|
||||
$pk->type = $this->getNetworkType();
|
||||
$holder = $this->getHolder();
|
||||
|
||||
$pk->x = $pk->y = $pk->z = 0;
|
||||
$pk->entityUniqueId = -1;
|
||||
|
||||
if($holder instanceof Entity){
|
||||
$pk->entityUniqueId = $holder->getId();
|
||||
}elseif($holder instanceof Vector3){
|
||||
$pk->x = (int) $holder->getX();
|
||||
$pk->y = (int) $holder->getY();
|
||||
$pk->z = (int) $holder->getZ();
|
||||
}else{
|
||||
$pk->x = $pk->y = $pk->z = 0;
|
||||
}
|
||||
|
||||
$who->dataPacket($pk);
|
||||
|
Loading…
x
Reference in New Issue
Block a user