public void tick() {
		if (!hasUpdatedEntityID && network.getRegisteredClientId() != Constants.CLIENT_ID_UNREGISTERED) {
			hasUpdatedEntityID = true;
			updateClientID(network.getRegisteredClientId(), Constants.CLIENT_ID_UNREGISTERED);
		}

		List<Long> deletedEntities = new ArrayList<>();
		for (Entity e : entityMap.values()) {
			e.tick(this);
			if (e.isDeleted())
				deletedEntities.add(e.getEntityID());
		}
		entityMap.keySet().removeAll(deletedEntities);
		entityFactory.putAllNewEntities(entityMap);

		if (network.hasUnreadDTOs()) {
			synchronizeEntities(network.getUnreadDTOs());
		}
		if (timerSend.isTimeleft()) {
			for (Entity e : entityMap.values()) {
				if (e.isOwner()) {
					network.sendDTO(e.toDTO());
				}
			}
			network.sendNow();
		}
	}