mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-30 20:13:31 +00:00
FIX: Inventory change when cheating items (TODO: Linked slots)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user