Skip to content

Commit c5085e8

Browse files
committed
chore: bump LeviLamina to 1.7.0
1 parent e3b27bf commit c5085e8

File tree

5 files changed

+28
-22
lines changed

5 files changed

+28
-22
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.16.0] - 2025-11-04
11+
12+
### Changed
13+
14+
- Supported LeviLamina 1.7.0 @ShrBox
15+
1016
## [0.15.0] - 2025-10-04
1117

1218
### Changed
@@ -1022,7 +1028,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10221028
[#310]: https://github.com/LiteLDev/LegacyScriptEngine/issues/310
10231029
[#323]: https://github.com/LiteLDev/LegacyScriptEngine/issues/323
10241030

1025-
[Unreleased]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.15.0...HEAD
1031+
[Unreleased]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.16.0...HEAD
1032+
[0.16.0]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.15.0...v0.16.0
10261033
[0.15.0]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.14.0...v0.15.0
10271034
[0.14.0]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.13.2...v0.14.0
10281035
[0.13.2]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.13.1...v0.13.2

src/legacy/api/BlockAPI.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "mc/world/level/ChunkBlockPos.h"
1616
#include "mc/world/level/block/BedrockBlockNames.h"
1717
#include "mc/world/level/block/Block.h"
18+
#include "mc/world/level/block/BlockChangeContext.h"
1819
#include "mc/world/level/block/LiquidReaction.h"
1920
#include "mc/world/level/block/VanillaBlockTags.h"
2021
#include "mc/world/level/block/actor/BlockActor.h"
@@ -297,7 +298,8 @@ Local<Value> BlockClass::destroyBlock(const Arguments& args) {
297298
BlockSource& bl =
298299
ll::service::getLevel()->getDimension(blockPos.dim).lock()->getBlockSourceFromMainChunkSource();
299300
return Boolean::newBoolean(
300-
ll::service::getLevel()->destroyBlock(bl, blockPos.getBlockPos(), args[0].asBoolean().value())
301+
ll::service::getLevel()
302+
->destroyBlock(bl, blockPos.getBlockPos(), args[0].asBoolean().value(), BlockChangeContext())
301303
);
302304
}
303305
CATCH("Fail in destroyBlock!");
@@ -325,7 +327,7 @@ Local<Value> BlockClass::setNbt(const Arguments& args) {
325327
->getDimension(blockPos.dim)
326328
.lock()
327329
->getBlockSourceFromMainChunkSource()
328-
.setBlock(blockPos.getBlockPos(), *bl, 3, nullptr, nullptr);
330+
.setBlock(blockPos.getBlockPos(), *bl, 3, nullptr, nullptr, BlockChangeContext());
329331
}
330332
preloadData(blockPos.getBlockPos(), blockPos.getDimensionId());
331333
return Boolean::newBoolean(true);
@@ -533,7 +535,7 @@ Local<Value> McClass::setBlock(const Arguments& args) {
533535
}
534536
BlockSource& bs =
535537
ll::service::getLevel()->getDimension(pos.dim).lock()->getBlockSourceFromMainChunkSource();
536-
return Boolean::newBoolean(bs.setBlock(pos.getBlockPos(), bl, 3, nullptr, nullptr));
538+
return Boolean::newBoolean(bs.setBlock(pos.getBlockPos(), bl, 3, nullptr, nullptr, BlockChangeContext()));
537539
} else if (IsInstanceOf<NbtCompoundClass>(block)) {
538540
// Nbt
539541
auto nbt = NbtCompoundClass::extract(block);
@@ -543,7 +545,7 @@ Local<Value> McClass::setBlock(const Arguments& args) {
543545
}
544546
BlockSource& bs =
545547
ll::service::getLevel()->getDimension(pos.dim).lock()->getBlockSourceFromMainChunkSource();
546-
return Boolean::newBoolean(bs.setBlock(pos.getBlockPos(), bl, 3, nullptr, nullptr));
548+
return Boolean::newBoolean(bs.setBlock(pos.getBlockPos(), bl, 3, nullptr, nullptr, BlockChangeContext()));
547549
} else {
548550
// other block object
549551
Block const* bl = BlockClass::extract(block);
@@ -553,7 +555,7 @@ Local<Value> McClass::setBlock(const Arguments& args) {
553555
}
554556
BlockSource& bs =
555557
ll::service::getLevel()->getDimension(pos.dim).lock()->getBlockSourceFromMainChunkSource();
556-
return Boolean::newBoolean(bs.setBlock(pos.getBlockPos(), *bl, 3, nullptr, nullptr));
558+
return Boolean::newBoolean(bs.setBlock(pos.getBlockPos(), *bl, 3, nullptr, nullptr, BlockChangeContext()));
557559
}
558560
}
559561
CATCH("Fail in SetBlock!")

src/lse/events/EntityEvents.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,12 @@ LL_TYPE_INSTANCE_HOOK(
295295
) {
296296
IF_LISTENED(EVENT_TYPES::onNpcCmd) {
297297
auto& action =
298-
owner.getEntityContext()
299-
.tryGetComponent<NpcComponent>()
300-
->mActionsContainer->mUnke14f11.as<std::vector<std::variant<npc::CommandAction, npc::UrlAction>>>()
301-
.at(actionIndex);
298+
owner.getEntityContext().tryGetComponent<NpcComponent>()->mActionsContainer->mActions->at(actionIndex);
302299
if (std::holds_alternative<npc::CommandAction>(action)) {
303300
auto& commands = std::get<npc::CommandAction>(action).commands;
304301
std::string command;
305302
for (auto& cmd : commands.get()) {
306-
command += cmd.mUnk879303.as<std::string>() + ";";
303+
command += cmd.rawCommand.get() + ";";
307304
}
308305
if (!commands->empty()) {
309306
command.pop_back();

tooth.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"format_version": 3,
33
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
44
"tooth": "github.com/LiteLDev/LegacyScriptEngine",
5-
"version": "0.15.0",
5+
"version": "0.16.0",
66
"info": {
77
"name": "LegacyScriptEngine",
88
"description": "A plugin engine for running LLSE plugins on LeviLamina",
@@ -25,8 +25,8 @@
2525
"label": "nodejs",
2626
"platform": "win-x64",
2727
"dependencies": {
28-
"github.com/LiteLDev/LegacyRemoteCall": "0.15.*",
29-
"github.com/LiteLDev/LegacyMoney": "0.15.*",
28+
"github.com/LiteLDev/LegacyRemoteCall": "0.16.*",
29+
"github.com/LiteLDev/LegacyMoney": "0.16.*",
3030
"git.levimc.org/ShrBox/7-zip": "24.*"
3131
},
3232
"assets": [
@@ -62,8 +62,8 @@
6262
"label": "quickjs",
6363
"platform": "win-x64",
6464
"dependencies": {
65-
"github.com/LiteLDev/LegacyRemoteCall": "0.15.*",
66-
"github.com/LiteLDev/LegacyMoney": "0.15.*"
65+
"github.com/LiteLDev/LegacyRemoteCall": "0.16.*",
66+
"github.com/LiteLDev/LegacyMoney": "0.16.*"
6767
},
6868
"assets": [
6969
{
@@ -85,8 +85,8 @@
8585
"label": "lua",
8686
"platform": "win-x64",
8787
"dependencies": {
88-
"github.com/LiteLDev/LegacyRemoteCall": "0.15.*",
89-
"github.com/LiteLDev/LegacyMoney": "0.15.*"
88+
"github.com/LiteLDev/LegacyRemoteCall": "0.16.*",
89+
"github.com/LiteLDev/LegacyMoney": "0.16.*"
9090
},
9191
"assets": [
9292
{
@@ -108,8 +108,8 @@
108108
"label": "python",
109109
"platform": "win-x64",
110110
"dependencies": {
111-
"github.com/LiteLDev/LegacyRemoteCall": "0.15.*",
112-
"github.com/LiteLDev/LegacyMoney": "0.15.*"
111+
"github.com/LiteLDev/LegacyRemoteCall": "0.16.*",
112+
"github.com/LiteLDev/LegacyMoney": "0.16.*"
113113
},
114114
"assets": [
115115
{

xmake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ add_rules("mode.debug", "mode.release")
33
add_repositories("levimc-repo https://github.com/LiteLDev/xmake-repo.git")
44

55
if is_config("target_type", "server") then
6-
add_requires("levilamina 1.6.0", {configs = {target_type = "server"}})
6+
add_requires("levilamina 1.7.0", {configs = {target_type = "server"}})
77
else
8-
add_requires("levilamina 1.6.0", {configs = {target_type = "client"}})
8+
add_requires("levilamina 1.7.0", {configs = {target_type = "client"}})
99
end
1010

1111
add_requires("levibuildscript")

0 commit comments

Comments
 (0)