public DoublePair resolveCollisions(double amtX, double amtY) {
		final DoublePair amts = new DoublePair(amtX, amtY);
		ColliderComponent c = (ColliderComponent) getEntity().getComponent(
				ColliderComponent.ID);
		if (c == null) {
			return amts;
		}
		final AABB collider = c.getAABB();
		final AABB collisionRange = collider.stretch(amtX, amtY);
		getEntity().visitInRange(CollisionComponent.ID, collisionRange,
				new IEntityVisitor() {
					@Override
					public void visit(Entity entity, EntityComponent component) {
						if (entity == getEntity()) {
							return;
						}
						ColliderComponent c2 = (ColliderComponent) entity
								.getComponent(ColliderComponent.ID);
						if (c2 == null) {
							return;
						}
						AABB collider2 = c2.getAABB();

						if (collider2.intersects(collisionRange)) {
							amts.setVal1(collider.resolveCollisionX(collider2,
									amts.getVal1()));
							amts.setVal2(collider.resolveCollisionY(collider2,
									amts.getVal2()));
						}
					}
				});
		return amts;
	}