Skip to content

Commit 7cac6fd

Browse files
committed
chore: update CHANGELOG.md
1 parent 99a2e71 commit 7cac6fd

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
- Fix truePos pre calculation
1717
- Fix onProjectileHitBlock & onProjectileHitEntity #108
18+
- Fix mc.explode #111
1819

1920
## [0.7.3] - 2024-05-01
2021

Diff for: mkdocs.yml

-8
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ nav:
4343
- GuiAPI:
4444
- apis/GuiAPI/Form.md
4545
- apis/GuiAPI/FormBuilder.md
46-
- NativeAPI:
47-
- apis/NativeAPI/NativeFunction.md
48-
- apis/NativeAPI/NativePatch.md
49-
- apis/NativeAPI/NativePointer.md
50-
- apis/NativeAPI/Summary.md
5146
- NbtAPI:
5247
- apis/NbtAPI/NBT.md
5348
- apis/NbtAPI/NBTCompound.md
@@ -65,9 +60,6 @@ nav:
6560
- apis/SystemAPI/SystemCall.md
6661
- apis/SystemAPI/SystemInfo.md
6762

68-
exclude_docs: |
69-
api/native/
70-
7163
theme:
7264
name: material
7365
features:

Diff for: src/legacy/api/CommandAPI.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,21 @@
1212
#include "engine/EngineOwnData.h"
1313
#include "engine/GlobalShareData.h"
1414
#include "engine/LocalShareData.h"
15-
#include "ll/api/command/CommandRegistrar.h"
1615
#include "ll/api/event/EventBus.h"
1716
#include "ll/api/event/server/ServerStartedEvent.h"
1817
#include "ll/api/service/Bedrock.h"
19-
#include "ll/api/service/ServerInfo.h"
2018
#include "lse/Plugin.h"
2119
#include "magic_enum.hpp"
22-
#include "main/Configs.h"
2320
#include "mc/_HeaderOutputPredefine.h"
24-
#include "mc/codebuilder/MCRESULT.h"
2521
#include "mc/common/wrapper/GenerateMessageResult.h"
2622
#include "mc/deps/json/JsonHelpers.h"
2723
#include "mc/enums/CurrentCmdVersion.h"
2824
#include "mc/locale/I18n.h"
2925
#include "mc/locale/Localization.h"
3026
#include "mc/server/ServerLevel.h"
31-
#include "mc/server/commands/BlockStateCommandParam.h"
3227
#include "mc/server/commands/CommandBlockName.h"
3328
#include "mc/server/commands/CommandBlockNameResult.h"
3429
#include "mc/server/commands/CommandContext.h"
35-
#include "mc/server/commands/CommandOriginLoader.h"
36-
#include "mc/server/commands/CommandOutputParameter.h"
3730
#include "mc/server/commands/CommandOutputType.h"
3831
#include "mc/server/commands/CommandPermissionLevel.h"
3932
#include "mc/server/commands/CommandVersion.h"
@@ -43,9 +36,7 @@
4336
#include "mc/world/item/ItemInstance.h"
4437
#include "mc/world/item/registry/ItemStack.h"
4538
#include "mc/world/level/dimension/Dimension.h"
46-
#include "utils/Utils.h"
4739

48-
#include <filesystem>
4940
#include <string>
5041
#include <vector>
5142

Diff for: src/legacy/api/CommandCompatibleAPI.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
#include "api/APIHelp.h"
2-
#include "api/CommandAPI.h"
32
#include "api/McAPI.h"
43
#include "api/PlayerAPI.h"
54
#include "engine/EngineOwnData.h"
65
#include "engine/GlobalShareData.h"
76
#include "engine/LocalShareData.h"
8-
#include "ll/api/event/EventBus.h"
9-
#include "ll/api/event/server/ServerStartedEvent.h"
10-
#include "ll/api/memory/Memory.h"
117
#include "ll/api/service/Bedrock.h"
128
#include "main/Configs.h"
139
#include "main/Global.h"
1410
#include "utils/Utils.h"
1511

16-
#include <filesystem>
1712
#include <ll/api/command/CommandRegistrar.h>
1813
#include <string>
1914
#include <vector>

Diff for: src/lse/PluginManager.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
121121
logger.info("loading plugin {}", manifest.name);
122122

123123
if (hasPlugin(manifest.name)) {
124-
throw std::runtime_error("plugin already loaded");
124+
return ll::makeStringError("plugin already loaded");
125125
}
126126

127127
auto& scriptEngine = *EngineManager::newEngine(manifest.name);
@@ -166,7 +166,7 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
166166
auto baseLibPath = self.getPluginDir() / "baselib" / BaseLibFileName;
167167
auto baseLibContent = ll::file_utils::readFile(baseLibPath);
168168
if (!baseLibContent) {
169-
throw std::runtime_error(fmt::format("failed to read BaseLib at {}", baseLibPath.string()));
169+
return ll::makeStringError(fmt::format("failed to read BaseLib at {}", baseLibPath.string()));
170170
}
171171
scriptEngine.eval(baseLibContent.value());
172172
#endif
@@ -176,12 +176,12 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
176176
ENGINE_OWN_DATA()->pluginFileOrDirPath = entryPath.string();
177177
#ifdef LEGACY_SCRIPT_ENGINE_BACKEND_PYTHON
178178
if (!PythonHelper::loadPluginCode(&scriptEngine, entryPath.string(), dirPath.string())) {
179-
throw std::runtime_error(fmt::format("failed to load plugin code"));
179+
return ll::makeStringError(fmt::format("failed to load plugin code"));
180180
}
181181
#endif
182182
#ifdef LEGACY_SCRIPT_ENGINE_BACKEND_NODEJS
183183
if (!NodeJsHelper::loadPluginCode(&scriptEngine, entryPath.string(), dirPath.string())) {
184-
throw std::runtime_error(fmt::format("failed to load plugin code"));
184+
return ll::makeStringError(fmt::format("failed to load plugin code"));
185185
}
186186
#endif
187187
#if (defined LEGACY_SCRIPT_ENGINE_BACKEND_QUICKJS) || (defined LEGACY_SCRIPT_ENGINE_BACKEND_LUA)
@@ -192,7 +192,7 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
192192
// loadFile failed, try eval
193193
auto pluginEntryContent = ll::file_utils::readFile(entryPath);
194194
if (!pluginEntryContent) {
195-
throw std::runtime_error(fmt::format("Failed to read plugin entry at {}", entryPath.string()));
195+
return ll::makeStringError(fmt::format("Failed to read plugin entry at {}", entryPath.string()));
196196
}
197197
scriptEngine.eval(pluginEntryContent.value());
198198
}

0 commit comments

Comments
 (0)