private <T extends Entity> T updateIDs(final T entity, final long clientId) {
		entity.setClientId(clientId);
		entity.setEntityID(currentEntityId++);
		entity.setOwned(clientId == ownerId);

		if (addingToMap) {
			addingToMap = false;
			entityToCreateMap.put(entity.getEntityID(), entity);
		}

		return entity;
	}