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

Commit

Permalink
1.8.3 released. This version fix commandblock.
Browse files Browse the repository at this point in the history
  • Loading branch information
twoone3l committed Oct 2, 2021
1 parent ac80624 commit fa3f466
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions BDSpyrunner.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
</Link>
<PostBuildEvent>
<Command>if exist ..\BDS\plugins (
copy $(OutputPath)BDSpyrunner.dll ..\BDS\plugins\BDSpyrunner.dll
copy $(OutputPath)BDSpyrunner.pdb ..\BDS\plugins\BDSpyrunner.pdb
copy $(OutputPath)$(ProjectName).dll ..\BDS\plugins\$(ProjectName).dll
copy $(OutputPath)$(ProjectName).pdb ..\BDS\plugins\$(ProjectName).pdb
)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
Expand All @@ -86,8 +86,8 @@
</Link>
<PostBuildEvent>
<Command>if exist ..\BDS\plugins (
copy $(OutputPath)BDSpyrunner.dll ..\BDS\plugins\BDSpyrunner.dll
copy $(OutputPath)BDSpyrunner.pdb ..\BDS\plugins\BDSpyrunner.pdb
copy $(OutputPath)$(ProjectName).dll ..\BDS\plugins\$(ProjectName).dll
copy $(OutputPath)$(ProjectName).pdb ..\BDS\plugins\$(ProjectName).pdb
)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
Expand Down
7 changes: 5 additions & 2 deletions DllMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,11 @@ HOOK(onCommandBlockPerform, bool, "?_execute@CommandBlock@@AEBAXAEAVBlockSource@
int mode = SymCall<int>("?getMode@CommandBlockActor@@QEBA?AW4CommandBlockMode@@AEAVBlockSource@@@Z", a3, a2);
//无条件:0,有条件:1
bool condition = SymCall<bool>("?getConditionalMode@CommandBlockActor@@QEBA_NAEAVBlockSource@@@Z", a3, a2);
string cmd = FETCH(string, a3 + 264);
string rawname = FETCH(string, a3 + 296);
//SymCall<string&>("?getName@BaseCommandBlock@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ",
//a3 + 200);
//a3 + 200 BaseCommandBlock
string cmd = FETCH(string, a3 + 256);
string rawname = FETCH(string, a3 + 288);
if (EventCallBack(EventCode::onCommandBlockPerform,
"{s:i,s:b,s:s,s:s,s:O}",
"mode", mode,
Expand Down
2 changes: 1 addition & 1 deletion mc/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ string BlockLegacy::getBlockName() {
}

short BlockLegacy::getBlockItemID() {
return SymCall<short>("?getBlockItemId@BlockLegacy@@QEBAFXZ", this);
//IDA Item::beginCreativeGroup(,Block*,) 18~22
//short v3 = FETCH(short, this + 328);
//if (v3 < 0x100) {
// return v3;
//}
//return short(255 - v3);
return SymCall<short>("?getBlockItemId@BlockLegacy@@QEBAFXZ", this);
}

BlockLegacy* Block::getBlockLegacy() {
Expand Down
4 changes: 2 additions & 2 deletions mod/Version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
constexpr unsigned PYR_MAJOR_VERSION = 1;
constexpr unsigned PYR_MINOR_VERSION = 8;
constexpr unsigned PYR_MICRO_VERSION = 2;
constexpr const char* PYR_VERSION = "v1.8.2";
constexpr unsigned PYR_MICRO_VERSION = 3;
constexpr const char* PYR_VERSION = "v1.8.3";

0 comments on commit fa3f466

Please sign in to comment.