diff --git a/src/ll/api/memory/MemoryOperators.h b/src/ll/api/memory/MemoryOperators.h index e79629e901..3b360d730a 100644 --- a/src/ll/api/memory/MemoryOperators.h +++ b/src/ll/api/memory/MemoryOperators.h @@ -1,5 +1,5 @@ #pragma once - +#ifdef LL_MEMORY_OPERATORS // This header provides convenient overrides for the new and // delete operations in C++. // @@ -100,3 +100,4 @@ _NODISCARD _Ret_notnull_ _Success_(return != NULL) _Post_writable_byte_size_(siz operator new[](std::size_t size, std::align_val_t alignment, std::nothrow_t const& tag) noexcept { return operator new(size, alignment, tag); } +#endif \ No newline at end of file diff --git a/src/ll/core/tweak/MemoryOperators.cpp b/src/ll/core/tweak/MemoryOperators.cpp index 6df8c72c80..d29807b149 100644 --- a/src/ll/core/tweak/MemoryOperators.cpp +++ b/src/ll/core/tweak/MemoryOperators.cpp @@ -1 +1,3 @@ +#define LL_MEMORY_OPERATORS + #include "ll/api/memory/MemoryOperators.h" diff --git a/src/ll/test/Packet_test.cpp b/src/ll/test/Packet_test.cpp index 7725728ed5..c7cd9afcad 100644 --- a/src/ll/test/Packet_test.cpp +++ b/src/ll/test/Packet_test.cpp @@ -1,4 +1,4 @@ -// #define GENERATE_PACKET +#define GENERATE_PACKET #ifdef GENERATE_PACKET @@ -110,7 +110,7 @@ LL_AUTO_STATIC_HOOK(GeneratePacketHook, HookPriority::Normal, "main", int, int a return origin(a, c); } -#endif // GENERATE_PACKET +#else // GENERATE_PACKET #pragma region PacketInclude @@ -517,3 +517,5 @@ PACKET_SIZE_ASSERT(PlayerToggleCrafterSlotRequestPacket, 0x48); PACKET_SIZE_ASSERT(SetPlayerInventoryOptionsPacket, 0x48); #pragma endregion + +#endif // GENERATE_PACKET diff --git a/src/ll/test/TestCustomDimension.cpp b/src/ll/test/TestCustomDimension.cpp index 8cd3ed0a43..36582175c2 100644 --- a/src/ll/test/TestCustomDimension.cpp +++ b/src/ll/test/TestCustomDimension.cpp @@ -1,16 +1,16 @@ -#include "ll/api/dimension/SimpleCustomDimension.h" +// #include "ll/api/dimension/SimpleCustomDimension.h" -#include "ll/api/event/EventBus.h" -#include "ll/api/event/server/ServerStartedEvent.h" +// #include "ll/api/event/EventBus.h" +// #include "ll/api/event/server/ServerStartedEvent.h" -static bool reg = [] { - using namespace ll::event; - EventBus::getInstance().emplaceListener([](ServerStartedEvent&) { - ll::dimension::CustomDimensionManager::getInstance().addDimension( - "testNewDimension" - ); - ll::dimension::CustomDimensionManager::getInstance() - .addDimension("testNewVoidDimension", 345, GeneratorType::Void); - }); - return true; -}(); +// static bool reg = [] { +// using namespace ll::event; +// EventBus::getInstance().emplaceListener([](ServerStartedEvent&) { +// ll::dimension::CustomDimensionManager::getInstance().addDimension( +// "testNewDimension" +// ); +// ll::dimension::CustomDimensionManager::getInstance() +// .addDimension("testNewVoidDimension", 345, GeneratorType::Void); +// }); +// return true; +// }(); diff --git a/src/ll/test/TestNbt.cpp b/src/ll/test/TestNbt.cpp index 76bb5c7b26..19acba3b20 100644 --- a/src/ll/test/TestNbt.cpp +++ b/src/ll/test/TestNbt.cpp @@ -29,7 +29,7 @@ LL_AUTO_TYPE_INSTANCE_HOOK(NbtTest, HookPriority::Normal, ServerInstance, &Serve {"double", 0.3}, {"sdouble", 1.0}, } }, - {"bytearray", ByteArrayTag{{1, 2, 3, 4, 5, -2, -3, -6}} }, + {"bytearray", ByteArrayTag{{1, 2, 3, 4, 5, 62, 63, 66}} }, {"intarray", IntArrayTag{{1, 2, 3, 4, 5, -2, -3, -6}} }, }; @@ -49,7 +49,7 @@ LL_AUTO_TYPE_INSTANCE_HOOK(NbtTest, HookPriority::Normal, ServerInstance, &Serve { anull = null, byte = 127b, - bytearray = [B;1b, 2b, 3b, 4b, 5b, -2b, -3b, -6b], + bytearray = [B;1b, 2b, 3b, 4b, 5b, 62b, 63b, 66b], compound = { sdouble = 1.0 /*d*/, double = 0.3D, @@ -72,7 +72,7 @@ LL_AUTO_TYPE_INSTANCE_HOOK(NbtTest, HookPriority::Normal, ServerInstance, &Serve compound = { anull = null, "byte" = 127b - "bytearray" = [B;1b, 2b, 3b, 4b, 5b, -2b, -3b, -6b], // orld /**/ /* 34t */ + "bytearray" = [B;1b, 2b, 3b, 4b, 5b, 62b, 63b, 66b], // orld /**/ /* 34t */ "compound" = { "sdouble" = 1.0 /*d*/ "double" = 0.3D diff --git a/src/ll/test/customWorldGenerator/MyFlatWorldGenerator.hpp b/src/ll/test/customWorldGenerator/MyFlatWorldGenerator.hpp index 2c8b702416..e6ed509831 100644 --- a/src/ll/test/customWorldGenerator/MyFlatWorldGenerator.hpp +++ b/src/ll/test/customWorldGenerator/MyFlatWorldGenerator.hpp @@ -3,7 +3,7 @@ #include "ll/api/utils/RandomUtils.h" #include "ll/api/memory/Memory.h" -#include "mc/common/wrapper/FeatureRefTraits.h" +#include "mc/world/level/levelgen/feature/gamerefs_feature/FeatureRefTraits.h" #include "mc/common/wrapper/WeakRef.h" #include "mc/deps/core/debug/log/ContentLog.h" #include "mc/deps/core/string/HashedString.h" diff --git a/src/ll/test/customWorldGenerator/TestWorldGenerator.cpp b/src/ll/test/customWorldGenerator/TestWorldGenerator.cpp index a8a0c93350..d18e554cc7 100644 --- a/src/ll/test/customWorldGenerator/TestWorldGenerator.cpp +++ b/src/ll/test/customWorldGenerator/TestWorldGenerator.cpp @@ -2,7 +2,7 @@ #include "ll/api/memory/Hook.h" #include "ll/api/memory/Memory.h" #include "ll/core/LeviLamina.h" -#include "ll/test/customWorldGenerator/MyFlatWorldGenerator.hpp" +// #include "ll/test/customWorldGenerator/MyFlatWorldGenerator.hpp" #include "mc/world/level/dimension/OverworldDimension.h" // LL_AUTO_TYPE_INSTANCE_HOOK(OverworldDimensionCreateGeneratorHook, ll::memory::HookPriority::Normal, diff --git a/src/mc/entity/systems/ServerPlayerMovementComponent.h b/src/mc/entity/systems/ServerPlayerMovementComponent.h index cba8b573bb..8d761bfeb7 100644 --- a/src/mc/entity/systems/ServerPlayerMovementComponent.h +++ b/src/mc/entity/systems/ServerPlayerMovementComponent.h @@ -1,7 +1,7 @@ #pragma once #include "mc/_HeaderOutputPredefine.h" -#include "mc/world/actor/movement/MovementPackets.h" +#include "mc/entity/systems/movement/MovementPackets.h" // auto generated inclusion list #include "mc/common/wrapper/optional_ref.h" diff --git a/src/mc/network/packet/LegacyTelemetryEventPacket.h b/src/mc/network/packet/LegacyTelemetryEventPacket.h index f419936f21..295eb30d2b 100644 --- a/src/mc/network/packet/LegacyTelemetryEventPacket.h +++ b/src/mc/network/packet/LegacyTelemetryEventPacket.h @@ -144,15 +144,6 @@ class LegacyTelemetryEventPacket : public ::Packet { int mThresholdDuration_ms; } RaidUpdate; - struct { - MovementEventType mEventType; - float mObservedScore; - float mAveragePosDelta; - float mTotalPosDelta; - float mMinPosDelta; - float mMaxPosDelta; - } PlayerMovement; - struct { int mRedstoneLevel; } TargetBlockHit; diff --git a/src/mc/resources/PackErrorType.h b/src/mc/resources/PackErrorType.h new file mode 100644 index 0000000000..8365191e82 --- /dev/null +++ b/src/mc/resources/PackErrorType.h @@ -0,0 +1,12 @@ +#pragma once + +#include "mc/_HeaderOutputPredefine.h" + +enum class PackErrorType : int { + None = 0x0, + IncompletePackError = 0x1, + PackParseError = 0x2, + PackLoadError = 0x3, + UIError = 0x4, + PackSettingsError = 0x5, +}; diff --git a/src/mc/server/commands/CommandBlockName.h b/src/mc/server/commands/CommandBlockName.h index 9fc6f98bd6..640f1ff4f6 100644 --- a/src/mc/server/commands/CommandBlockName.h +++ b/src/mc/server/commands/CommandBlockName.h @@ -4,7 +4,9 @@ class CommandBlockName { public: - uint64 id; + uint64 id{}; + + CommandBlockName() = default; public: // NOLINTBEGIN diff --git a/src/mc/util/molang/MolangScriptArg.h b/src/mc/util/molang/MolangScriptArg.h index 4c663683be..06abf19a3c 100644 --- a/src/mc/util/molang/MolangScriptArg.h +++ b/src/mc/util/molang/MolangScriptArg.h @@ -50,6 +50,9 @@ struct MolangScriptArg { MCTAPI MolangScriptArg(MolangMemberArray const&); + template <> + MolangScriptArg(bool const& value) : MolangScriptArg(static_cast(value)) {} + public: // NOLINTBEGIN // symbol: ??0MolangScriptArg@@QEAA@XZ diff --git a/src/mc/world/item/NetworkItemStackDescriptor.h b/src/mc/world/item/NetworkItemStackDescriptor.h index dd1e818d17..b83647bc7b 100644 --- a/src/mc/world/item/NetworkItemStackDescriptor.h +++ b/src/mc/world/item/NetworkItemStackDescriptor.h @@ -19,8 +19,6 @@ class NetworkItemStackDescriptor : public ::ItemDescriptorCount { ItemStackNetIdVariant mNetIdVariant{}; // this+0x20 uint mBlockRuntimeId{}; // this+0x38 std::string mUserDataBuffer{}; // this+0x40 -public: - NetworkItemStackDescriptor() = default; public: // NOLINTBEGIN diff --git a/src/mc/world/level/biome/source/FixedBiomeSource.h b/src/mc/world/level/biome/source/FixedBiomeSource.h index f345b60c9e..cc3031c0b7 100644 --- a/src/mc/world/level/biome/source/FixedBiomeSource.h +++ b/src/mc/world/level/biome/source/FixedBiomeSource.h @@ -41,8 +41,8 @@ class FixedBiomeSource : public ::BiomeSource { // vIndex: 6, symbol: ?getBiome@FixedBiomeSource@@UEBAPEBVBiome@@AEBUGetBiomeOptions@@@Z virtual class Biome const* getBiome(struct GetBiomeOptions const&) const; - // vIndex: 7, symbol: ?getBiome@FixedBiomeSource@@UEBAPEBVBiome@@HHH@Z - virtual class Biome const* getBiome(int blockX, int, int blockZ) const; + // vIndex: 7, symbol: ?getBiome@FixedBiomeSource@@UEBAPEBVBiome@@AEBVBlockPos@@@Z + virtual class Biome const* getBiome(class BlockPos const& blockPos) const; // vIndex: 8, symbol: ?has@FixedBiomeSource@@UEBA_N_K@Z virtual bool has(uint64) const;