Skip to content

Commit

Permalink
fix: fix #101 #102
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Apr 14, 2024
1 parent 4557178 commit 7ad8ee8
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.2] - 2024-04-14

### Fixed

- Fix [#101] [#102]

## [0.6.1] - 2024-04-13

### Fixed
Expand Down Expand Up @@ -266,7 +272,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#97]: https://github.com/LiteLDev/LegacyScriptEngine/issues/97
[#99]: https://github.com/LiteLDev/LegacyScriptEngine/issues/99
[#100]: https://github.com/LiteLDev/LegacyScriptEngine/issues/100
[#101]: https://github.com/LiteLDev/LegacyScriptEngine/issues/101
[#102]: https://github.com/LiteLDev/LegacyScriptEngine/issues/102

[0.6.2]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.6.1...v0.6.2
[0.6.1]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.5.4...v0.6.0
[0.5.4]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.5.3...v0.5.4
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "native",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
"author": "LiteLDev",
"version": "0.6.1",
"version": "0.6.2",
"dependencies": [
{
"name": "LegacyMoney"
Expand Down
7 changes: 4 additions & 3 deletions src/legacy/api/NbtAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mc/nbt/CompoundTag.h>
#include <memory>
#include <string>
#include <string_view>
#include <vector>

using magic_enum::enum_cast;
Expand Down Expand Up @@ -1973,7 +1974,7 @@ Local<Value> NbtStatic::parseSNBT(const Arguments& args) {

try {
auto tag = CompoundTag::fromSnbt(args[0].toStr());
if (tag.has_value()) return NbtCompoundClass::pack(std::move(&tag.value()));
if (tag.has_value()) return NbtCompoundClass::pack(std::move(tag->clone()));
else return Local<Value>();
}
CATCH("Fail in parseSNBT!");
Expand All @@ -1985,8 +1986,8 @@ Local<Value> NbtStatic::parseBinaryNBT(const Arguments& args) {

try {
auto data = args[0].asByteBuffer();
auto tag = CompoundTag::fromBinaryNbt(data.describeUtf8());
if (tag.has_value()) return NbtCompoundClass::pack(std::move(&tag.value()));
auto tag = CompoundTag::fromBinaryNbt(std::string_view((char*)data.getRawBytes(), data.byteLength()));
if (tag.has_value()) return NbtCompoundClass::pack(std::move(tag->clone()));
else return Local<Value>();
}
CATCH("Fail in parseBinaryNBT!");
Expand Down
6 changes: 3 additions & 3 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/LiteLDev/LegacyScriptEngine",
"version": "0.6.1",
"version": "0.6.2",
"info": {
"name": "LegacyScriptEngine",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
Expand All @@ -12,7 +12,7 @@
]
},
"dependencies": {
"gitea.litebds.com/LiteLDev/legacy-script-engine-lua": "0.6.1",
"gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs": "0.6.1"
"gitea.litebds.com/LiteLDev/legacy-script-engine-lua": "0.6.2",
"gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs": "0.6.2"
}
}
2 changes: 1 addition & 1 deletion tooth.lua.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-lua",
"version": "0.6.1",
"version": "0.6.2",
"info": {
"name": "LegacyScriptEngine with Lua backend",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
Expand Down
2 changes: 1 addition & 1 deletion tooth.nodejs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-nodejs",
"version": "0.6.1",
"version": "0.6.2",
"info": {
"name": "LegacyScriptEngine with NodeJs backend",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
Expand Down
2 changes: 1 addition & 1 deletion tooth.python.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-python",
"version": "0.6.1",
"version": "0.6.2",
"info": {
"name": "LegacyScriptEngine with Python backend",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
Expand Down
2 changes: 1 addition & 1 deletion tooth.quickjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs",
"version": "0.6.1",
"version": "0.6.2",
"info": {
"name": "LegacyScriptEngine with QuickJs backend",
"description": "A plugin engine for running LLSE plugins on LeviLamina",
Expand Down

0 comments on commit 7ad8ee8

Please sign in to comment.