Oops, these fields need to be filled

This commit is contained in:
Dylan K. Taylor 2017-10-16 11:50:34 +01:00
parent 092cc2750f
commit 04668d534d

View File

@ -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);