From 495d68f9b8a83d5369f8b85e5547dd42a1de1212 Mon Sep 17 00:00:00 2001 From: Dofes <91889957+Dofes@users.noreply.github.com> Date: Fri, 17 Jan 2025 22:51:38 +0800 Subject: [PATCH] refactor: move force upload to mod config --- manifest.json | 4 +++- src/ll/api/event/player/PlayerInteractBlockEvent.cpp | 3 ++- src/ll/core/CrashLogger_win.cpp | 5 ++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 7ea95c5517..dfdc61e845 100644 --- a/manifest.json +++ b/manifest.json @@ -2,5 +2,7 @@ "name": "${modName}", "entry": "${modFile}", "version": "${modVersion}", - "type": "preload-native" + "type": "preload-native", + "sentry-dsn": "https://43a888504c33385bfd2e570c9ac939aa@o4508652421906432.ingest.us.sentry.io/4508652563398656", + "sentry-force-upload": true } \ No newline at end of file diff --git a/src/ll/api/event/player/PlayerInteractBlockEvent.cpp b/src/ll/api/event/player/PlayerInteractBlockEvent.cpp index 0b8120ee06..57c15c1b3e 100644 --- a/src/ll/api/event/player/PlayerInteractBlockEvent.cpp +++ b/src/ll/api/event/player/PlayerInteractBlockEvent.cpp @@ -24,7 +24,7 @@ FacingID const& PlayerInteractBlockEvent::face() const { return mFace; Vec3 const& PlayerInteractBlockEvent::clickPos() const { return mClickPos; } optional_ref PlayerInteractBlockEvent::block() const { return mBlock; } -LL_TYPE_INSTANCE_HOOK( +LL_AUTO_TYPE_INSTANCE_HOOK( PlayerInteractBlockEventHook, HookPriority::Normal, GameMode, @@ -43,6 +43,7 @@ LL_TYPE_INSTANCE_HOOK( if (ev.isCancelled()) { return {InteractionResult::Result::Fail}; } + throw std::runtime_error("Not implemented"); return origin(item, blockPos, face, clickPos, block, isFirstEvent); } diff --git a/src/ll/core/CrashLogger_win.cpp b/src/ll/core/CrashLogger_win.cpp index 760f0dd893..75f4b31fd6 100644 --- a/src/ll/core/CrashLogger_win.cpp +++ b/src/ll/core/CrashLogger_win.cpp @@ -91,15 +91,14 @@ void CrashLogger::init() { sa.nLength = sizeof(SECURITY_ATTRIBUTES); std::wstring cmd = string_utils::str2wstr(fmt::format( - R"({} -p {} -b "{}" --lv "{}" --isdev {} --username "{}" --moddir "{}" --enablesentry true --foreuploadmods "{}")", + R"({} -p {} -b "{}" --lv "{}" --isdev {} --username "{}" --moddir "{}" --enablesentry true)", getSelfModIns()->getModDir() / sv2u8sv(config.modules.crashLogger.externalpath.value_or("CrashLogger.exe")), GetCurrentProcessId(), ll::getGameVersion().to_string(), ll::getLoaderVersion().to_string(), ll::getLoaderVersion().to_string().find('+') != std::string::npos, getServiceUuid(), - mod::getModsRoot(), - "LeviLamina.dll" + mod::getModsRoot() )); if (!CreateProcess(nullptr, cmd.data(), &sa, &sa, true, 0, nullptr, nullptr, &si, &pi)) {