public function __construct(SourceInterface $interface, $clientID, $ip, $port)
{
$this->interface = $interface;
$this->windows = new \SplObjectStorage();
$this->perm = new PermissibleBase($this);
$this->namedtag = new CompoundTag();
$this->server = Server::getInstance();
$this->lastBreak = PHP_INT_MAX;
$this->ip = $ip;
$this->port = $port;
$this->clientID = $clientID;
$this->loaderId = Level::generateChunkLoaderId($this);
$this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4);
$this->spawnThreshold = (int) $this->server->getProperty("chunk-sending.spawn-threshold", 56);
$this->spawnPosition = null;
$this->gamemode = $this->server->getGamemode();
$this->setLevel($this->server->getDefaultLevel());
$this->viewDistance = $this->server->getViewDistance();
$this->newPosition = new Vector3(0, 0, 0);
$this->boundingBox = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
$this->uuid = null;
$this->rawUUID = null;
$this->creationTime = microtime(true);
$this->exp = 0;
$this->expLevel = 0;
$this->food = 20;
Entity::setHealth(20);
}