diff --git a/LiteLoader/Header/MC/Command.hpp b/LiteLoader/Header/MC/Command.hpp index 21f1588..ab0563c 100644 --- a/LiteLoader/Header/MC/Command.hpp +++ b/LiteLoader/Header/MC/Command.hpp @@ -70,13 +70,22 @@ public: std::string getCommandName() const{ return this->registry->symbolToString(this->symbol); }; + Command(){ + CommandFlag mflag; + mflag.value = CommandFlagValue::None; + *(void**)this = dlsym("??_7Command@@6B@"); + this->version = 0; + this->registry = 0LL; + this->symbol = -1; + this->permission = CommandPermissionLevel(5); + this->flag = mflag; + } #undef AFTER_EXTRA #ifndef DISABLE_CONSTRUCTOR_PREVENTION_COMMAND public: class Command& operator=(class Command const &) = delete; Command(class Command const &) = delete; - Command(){}; #endif public: diff --git a/LiteLoader/Header/MC/CommandMessage.hpp b/LiteLoader/Header/MC/CommandMessage.hpp index e53563e..5360a16 100644 --- a/LiteLoader/Header/MC/CommandMessage.hpp +++ b/LiteLoader/Header/MC/CommandMessage.hpp @@ -4,7 +4,7 @@ #include "../Global.h" #define BEFORE_EXTRA - +#include "CommandSelector.hpp" #undef BEFORE_EXTRA class CommandMessage { @@ -13,9 +13,11 @@ class CommandMessage { // Add Member There struct MessageComponent { - char filler[200]; - void* unk[2]; - std::vector unk2[5]; +// char filler[200]; +// void* unk[2]; +// std::vector unk2[5]; + std::string str; + std::unique_ptr> select; }; std::vector components; diff --git a/LiteLoader/Kernel/Command/CommandRegistryAPI.cpp b/LiteLoader/Kernel/Command/CommandRegistryAPI.cpp index ea5ba65..c5b3e54 100644 --- a/LiteLoader/Kernel/Command/CommandRegistryAPI.cpp +++ b/LiteLoader/Kernel/Command/CommandRegistryAPI.cpp @@ -8,8 +8,8 @@ static_assert(offsetof(CommandParameterData, options) == 73); static_assert(offsetof(CommandParameterData, name) == 16); static_assert(offsetof(CommandParameterData, unk56) == 56); - static_assert(offsetof(CommandRegistry::Overload, unk) == 40); - static_assert(sizeof(CommandRegistry::Overload) == 72); + static_assert(offsetof(CommandRegistry::Overload, versionOffset) == 40); + static_assert(sizeof(CommandRegistry::Overload) == 48); static_assert(offsetof(CommandRegistry::Signature, alt_symbol) == 96); static_assert(sizeof(CommandRegistry::Signature) == 120); /* @@ -28,7 +28,7 @@ : version(version) , factory(factory) , params(std::forward>(args)) - , unk(255){}; + , versionOffset(255){}; CommandRegistry::Overload::~Overload(){};