FIX: Inventory change when cheating items (TODO: Linked slots)

This commit is contained in:
InviseDivine
2026-03-27 17:05:50 +02:00
parent f9d9a0f0f9
commit 6957f144e1
3 changed files with 19 additions and 0 deletions

View File

@@ -386,6 +386,18 @@ void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& source, MovePlay
entity->lerpTo(packet->x, packet->y, packet->z, packet->yRot, packet->xRot, 3);
}
}
void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& source, SendInventoryPacket* packet) {
if (!level) return;
// TODO: Linked slots
if (packet->entityId == minecraft->player->entityId) {
auto items = packet->items;
minecraft->player->inventory->replace(items);
}
}
void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& source, TakeItemPacket* packet) {
if (!level) return;