Skip to content

Commit

Permalink
feat: support LeviLamina 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jun 19, 2024
1 parent b17d099 commit d3a8465
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.0] - 2024-06-19

### Added

- Adapt to LeviLamina 0.13.x

## [0.2.5] - 2024-04-28

### Changed
Expand Down Expand Up @@ -52,14 +58,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.1.8] - 2024-03-29

### Removed

- Removed `BlockLookupOpt`

### Changed

- Adapted to LeviLamina 0.10.2

### Removed

- Removed `BlockLookupOpt`

## [0.1.7] - 2024-03-14

### Changed
Expand Down Expand Up @@ -88,7 +94,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed some bugs

[Unreleased]: https://github.com/LiteLDev/LeviOptimize/compare/v0.2.5...HEAD
[Unreleased]: https://github.com/LiteLDev/LeviOptimize/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/LiteLDev/LeviOptimize/compare/v0.2.5...v0.3.0
[0.2.5]: https://github.com/LiteLDev/LeviOptimize/compare/v0.2.4...v0.2.5
[0.2.4]: https://github.com/LiteLDev/LeviOptimize/compare/v0.2.3...v0.2.4
[0.2.3]: https://github.com/LiteLDev/LeviOptimize/compare/v0.2.2...v0.2.3
Expand Down
10 changes: 7 additions & 3 deletions src/levioptimize/features/PacketSenderOpt.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "features.h"
#include "ll/api/memory/Hook.h"
#include "ll/api/memory/Memory.h"
#include "mc/deps/core/utility/BinaryStream.h"
#include "mc/deps/raknet/AddressOrGUID.h"
#include "mc/deps/raknet/RakPeer.h"
Expand All @@ -10,6 +11,7 @@
#include "mc/network/packet/Packet.h"
#include "mc/resources/PacketPriority.h"
#include "mc/resources/PacketReliability.h"
#include "mc/server/LoopbackPacketSender.h"

namespace lo::packet_sender_opt {

Expand Down Expand Up @@ -89,8 +91,9 @@ LL_TYPE_INSTANCE_HOOK(
LL_TYPE_INSTANCE_HOOK(
NetworkSystemSendMultiHook,
ll::memory::HookPriority::Normal,
NetworkSystem,
&NetworkSystem::sendToMultiple,
LoopbackPacketSender,
"?sendToClients@LoopbackPacketSender@@UEAAXAEBV?$vector@UNetworkIdentifierWithSubId@@V?$allocator@"
"UNetworkIdentifierWithSubId@@@std@@@std@@AEBVPacket@@@Z",
void,
std::vector<struct NetworkIdentifierWithSubId> const& ids,
Packet const& packet
Expand Down Expand Up @@ -122,7 +125,8 @@ LL_TYPE_INSTANCE_HOOK(
.size = res.size() - 5 + size,
.cap = res.capacity() > 16 ? res.capacity() : 16
};
_sendInternal(id.mIdentifier, packet, *(std::string*)(&datas));
ll::memory::dAccess<NetworkSystem>(&mNetwork.toServerNetworkSystem(), 24)
._sendInternal(id.mIdentifier, packet, *(std::string*)(&datas));
}
}

Expand Down
6 changes: 3 additions & 3 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/LiteLDev/LeviOptimize",
"version": "0.2.5",
"version": "0.3.0",
"info": {
"name": "LeviOptimize",
"description": "A performance optimization plugin for Minecraft Bedrock Server",
Expand All @@ -11,9 +11,9 @@
"plugin"
]
},
"asset_url": "https://github.com/LiteLDev/LeviOptimize/releases/download/v0.2.5/LeviOptimize-windows-x64.zip",
"asset_url": "https://github.com/LiteLDev/LeviOptimize/releases/download/v0.3.0/LeviOptimize-windows-x64.zip",
"prerequisites": {
"github.com/LiteLDev/LeviLamina": "0.12.x"
"github.com/LiteLDev/LeviLamina": "0.13.x"
},
"files": {
"place": [
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_rules("mode.release", "mode.debug")
add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")

add_requires(
"levilamina",
"levilamina 0.13.0",
"parallel-hashmap"
)

Expand Down

0 comments on commit d3a8465

Please sign in to comment.