Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
去除了zip路径
Browse files Browse the repository at this point in the history
  • Loading branch information
twoone3l committed Dec 4, 2021
1 parent a609f87 commit faacee3
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions mod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,42 +238,43 @@ class EventCallBackHelper {
//将Python解释器初始化插入bds主函数
THOOK(BDS_Main, int, "main",
int argc, char* argv[], char* envp[]) {
// while (true) {
// Tag* t = ObjecttoTag(StringToJson(R"(
// {
// "Block10": {
// "name8": "minecraft:crafting_table",
// "states10": null,
// "version3": 17879555
// },
// "Count1": 64,
// "Damage2": 0,
// "Name8": "minecraft:crafting_table",
// "WasPickedUp1": 0,
// "tag10": {
// "display10": {
// "Lore9": [
// "针不戳",
// "很不错"
// ]
// }
// }
// }
//)"));
// cout << CompoundTagtoJson(t).dump(4) << endl;
// t->deleteCompound();
// delete t;
// }
//如果目录不存在创建目录
#if 0
while (true) {
Tag* t = ObjecttoTag(StringToJson(R"(
{
"Block10": {
"name8": "minecraft:crafting_table",
"states10": null,
"version3": 17879555
},
"Count1": 64,
"Damage2": 0,
"Name8": "minecraft:crafting_table",
"WasPickedUp1": 0,
"tag10": {
"display10": {
"Lore9": [
"针不戳",
"很不错"
]
}
}
}
)"));
cout << CompoundTagtoJson(t).dump(4) << endl;
t->deleteCompound();
delete t;
}
#endif
//如果目录不存在创建目录
if (!fs::exists(PLUGIN_PATH))
fs::create_directory(PLUGIN_PATH);
//设置模块搜索路径
Py_SetPath(
PLUGIN_PATH L";"
PLUGIN_PATH "Dlls;"
PLUGIN_PATH "Lib;"
PLUGIN_PATH "Extra;"
"plugins\\lib\\python37.zip"
PLUGIN_PATH "Extra"
);
#if 0
//预初始化3.8+
Expand Down Expand Up @@ -715,7 +716,7 @@ THOOK(onCommandBlockPerform, bool, "?_execute@CommandBlock@@AEBAXAEAVBlockSource
// a3 + 200);
//a3 + 200 BaseCommandBlock
string cmd = Dereference<string>(a3, 256);
string rawname = Dereference<string>(a3 , 288);
string rawname = Dereference<string>(a3, 288);
h
.insert("mode", mode)
.insert("condition", condition)
Expand Down

0 comments on commit faacee3

Please sign in to comment.