diff --git a/Horion/Loader.cpp b/Horion/Loader.cpp index 6a95a8c97..f91364625 100644 --- a/Horion/Loader.cpp +++ b/Horion/Loader.cpp @@ -323,7 +323,6 @@ DWORD WINAPI start(LPVOID lpParam) { gameModule = mem.GetModule(L"Minecraft.Windows.exe"); // Get Module for Base Address MH_Initialize(); - g_Data.checkGameVersion(); GameData::initGameData(gameModule, &mem, (HMODULE)lpParam); Target::init(g_Data.getPtrLocalPlayer()); diff --git a/Horion/Module/Modules/NoSlowDown.cpp b/Horion/Module/Modules/NoSlowDown.cpp index f3017554f..5b40af4dc 100644 --- a/Horion/Module/Modules/NoSlowDown.cpp +++ b/Horion/Module/Modules/NoSlowDown.cpp @@ -18,11 +18,7 @@ const char* NoSlowDown::getModuleName() { void NoSlowDown::onEnable() { if (opcode == 0 || opcode1 == 0) { opcode = reinterpret_cast(FindSignature("F3 0F 11 46 ? 45 89 ? ? F3 0F 10 46 ?")); - - if (g_Data.getVersion() == GAMEVERSION::g_1_16_0) - opcode1 = reinterpret_cast(FindSignature("F3 0F 11 47 ? F3 0F 10 05")); - else - opcode1 = reinterpret_cast(FindSignature("F3 0F 11 46 ? F3 0F 10 4E ?")); + opcode1 = reinterpret_cast(FindSignature("F3 0F 11 46 ? F3 0F 10 4E ?")); } DWORD oldProtect = 0; @@ -58,11 +54,7 @@ void NoSlowDown::onEnable() { void NoSlowDown::onDisable() { if (opcode == 0 || opcode1 == 0) { opcode = reinterpret_cast(FindSignature("F3 0F 11 46 ? 45 89 ? ? F3 0F 10 46 ?")); - - if (g_Data.getVersion() == GAMEVERSION::g_1_16_0) - opcode1 = reinterpret_cast(FindSignature("F3 0F 11 47 ? F3 0F 10 05")); - else - opcode1 = reinterpret_cast(FindSignature("F3 0F 11 46 ? F3 0F 10 4E ?")); + opcode1 = reinterpret_cast(FindSignature("F3 0F 11 46 ? F3 0F 10 4E ?")); } DWORD oldProtect = 0; @@ -91,10 +83,7 @@ void NoSlowDown::onDisable() { opcode1[1] = 0x0F; opcode1[2] = 0x11; - if (g_Data.getVersion() == GAMEVERSION::g_1_16_0) - opcode1[3] = 0x47; - else - opcode1[3] = 0x46; + opcode1[3] = 0x46; opcode1[4] = 0x0C; //opcode[5] = {0xF3; 0x0F, 0x11, 0x46, 0x0C}; diff --git a/Horion/path/JoePathFinder.cpp b/Horion/path/JoePathFinder.cpp index 399cce099..cbb94f109 100644 --- a/Horion/path/JoePathFinder.cpp +++ b/Horion/path/JoePathFinder.cpp @@ -87,10 +87,7 @@ __forceinline bool isDangerous(const vec3_ti& pos, C_BlockSource* reg, bool allo static uintptr_t** witherRoseVtable = nullptr; if (witherRoseVtable == nullptr) { uintptr_t sigOffset = 0; - if(g_Data.getVersion() == GAMEVERSION::g_1_16_0) - sigOffset = FindSignature("48 8D 05 ?? ?? ?? ?? 49 89 06 48 B9"); - else - sigOffset = FindSignature("48 8D 05 ?? ?? ?? ?? 48 89 06 48 B9"); + sigOffset = FindSignature("48 8D 05 ?? ?? ?? ?? 48 89 06 48 B9"); int offset = *reinterpret_cast(sigOffset + 3); witherRoseVtable = reinterpret_cast(sigOffset + offset + /*length of instruction*/ 7); } diff --git a/Memory/GameData.cpp b/Memory/GameData.cpp index ae89a7055..d7883ca4a 100644 --- a/Memory/GameData.cpp +++ b/Memory/GameData.cpp @@ -25,23 +25,6 @@ void GameData::retrieveClientInstance() { #endif } -void GameData::checkGameVersion() { - static uintptr_t sigOffset = 0; - // near string MinimumCompatibleClientVersion - if (sigOffset == 0) - sigOffset = FindSignature("48 8D 15 ?? ?? ?? ?? 48 3B CA 74 ?? 48 83 3D ?? ?? ?? ?? 10 48 0F 43 15 ?? ?? ?? ?? 4C 8B 05 ?? ?? ?? ?? E8 ?? ?? ?? ?? 49 8B C7"); - int offset = *reinterpret_cast((sigOffset + 3)); - std::string ver = reinterpret_cast(sigOffset + offset + 7)->getText(); - auto lastDot = ver.find_last_of("."); - if (lastDot == std::string::npos || lastDot >= ver.size() - 1) { - this->version = static_cast(0); - return; - } - - int num = std::stoi(ver.substr(lastDot + 1)); - this->version = static_cast(num); -} - bool GameData::canUseMoveKeys() { MinecraftGame* mc = g_Data.clientInstance->minecraftGame; if (mc == nullptr) { diff --git a/Memory/GameData.h b/Memory/GameData.h index af60fbf7a..af49d2e3f 100644 --- a/Memory/GameData.h +++ b/Memory/GameData.h @@ -28,13 +28,6 @@ enum DATAPACKET_CMD : int { CMD_LOG }; -enum GAMEVERSION : int { - g_1_16_0 = 0, - g_1_16_1 = 1, - g_1_16_10 = 10, - g_1_16_20 = 20 -}; - struct HorionDataPacket { DATAPACKET_CMD cmd; int params[5] = {0}; @@ -102,7 +95,6 @@ class GameData { AccountInformation accountInformation = AccountInformation::asGuest(); static void retrieveClientInstance(); TextHolder* fakeName; - GAMEVERSION version; public: NetworkedData networkedData; @@ -124,7 +116,6 @@ class GameData { static void setHIDController(C_HIDController* Hid); static void setRakNetInstance(C_RakNetInstance* raknet); static void log(const char* fmt, ...); - void checkGameVersion(); float fov = 0.f; int fps = 0; int frameCount = 0; @@ -260,7 +251,6 @@ class GameData { int getFPS() { return fps; }; int getLeftCPS() { return cpsLeft; }; int getRightCPS() { return cpsRight; }; - GAMEVERSION getVersion() { return version; }; }; extern GameData g_Data; diff --git a/Memory/Hooks.cpp b/Memory/Hooks.cpp index 4abc8ffa3..81a12cf70 100644 --- a/Memory/Hooks.cpp +++ b/Memory/Hooks.cpp @@ -975,10 +975,7 @@ void Hooks::Actor_lerpMotion(C_Entity* _this, vec3_t motVec) { static void* networkSender = nullptr; if (!networkSender) { - if (g_Data.getVersion() == GAMEVERSION::g_1_16_0) - networkSender = reinterpret_cast(6 + FindSignature("FF 90 ?? ?? ?? ?? 4C 8D 9C 24 ?? ?? ?? ?? 49 8B 5B 18 49 8B 73 28 49 8B E3 5F C3")); - else - networkSender = reinterpret_cast(3 + FindSignature("FF 50 ? 41 80 BE ? ? ? ? ? 0F 85 ? ? ? ? EB 76")); + networkSender = reinterpret_cast(3 + FindSignature("FF 50 ? 41 80 BE ? ? ? ? ? 0F 85 ? ? ? ? EB 76")); } if (networkSender == _ReturnAddress()) { diff --git a/SDK/CBlockLegacy.cpp b/SDK/CBlockLegacy.cpp index ce26440a7..6f88b8681 100644 --- a/SDK/CBlockLegacy.cpp +++ b/SDK/CBlockLegacy.cpp @@ -29,10 +29,7 @@ void C_BlockLegacy::liquidGetFlow(vec3_t* flowOut, C_BlockSource* reg, const vec using liquid_getFlow_t = int(__fastcall*)(C_BlockLegacy*, vec3_t*, C_BlockSource*, const vec3_ti*); static liquid_getFlow_t liquid_getDepth = nullptr; if(liquid_getDepth == nullptr){ - if(g_Data.getVersion() == GAMEVERSION::g_1_16_0) - liquid_getDepth = reinterpret_cast(FindSignature("48 8B C4 55 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 48 C7 45 ? ? ? ? ? 48 89 58 ? 0F 29 70 ? 0F 29 78 ? 44 0F 29 40 ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 45 ? 49 8B F1 4C 89 4C 24")); - else - liquid_getDepth = reinterpret_cast(FindSignature("40 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ?? 48 81 EC ?? ?? ?? ?? 48 C7 45 ?? ?? ?? ?? ?? 48 89 9C 24 ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 45 ?? 49 8B F1 4C 89 4C")); + liquid_getDepth = reinterpret_cast(FindSignature("40 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ?? 48 81 EC ?? ?? ?? ?? 48 C7 45 ?? ?? ?? ?? ?? 48 89 9C 24 ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 45 ?? 49 8B F1 4C 89 4C")); } liquid_getDepth(this, flowOut, reg, pos); }