forked from Kolyah35/minecraft-pe-0.6.1
the whole game
This commit is contained in:
43
src/network/packet/ContainerSetDataPacket.h
Executable file
43
src/network/packet/ContainerSetDataPacket.h
Executable file
@@ -0,0 +1,43 @@
|
||||
#ifndef NET_MINECRAFT_NETWORK_PACKET__ContainerSetDataPacket_H__
|
||||
#define NET_MINECRAFT_NETWORK_PACKET__ContainerSetDataPacket_H__
|
||||
|
||||
//package net.minecraft.network.packet;
|
||||
|
||||
#include "../Packet.h"
|
||||
|
||||
class ContainerSetDataPacket: public Packet
|
||||
{
|
||||
public:
|
||||
ContainerSetDataPacket() {
|
||||
}
|
||||
|
||||
ContainerSetDataPacket(int containerId, int id, int value)
|
||||
: containerId(containerId),
|
||||
id(id),
|
||||
value(value)
|
||||
{
|
||||
}
|
||||
|
||||
void write(RakNet::BitStream* bitStream) {
|
||||
bitStream->Write((RakNet::MessageID)(ID_USER_PACKET_ENUM + PACKET_CONTAINERSETDATA));
|
||||
bitStream->Write(containerId);
|
||||
bitStream->Write(id);
|
||||
bitStream->Write(value);
|
||||
}
|
||||
|
||||
void read(RakNet::BitStream* bitStream) {
|
||||
bitStream->Read(containerId);
|
||||
bitStream->Read(id);
|
||||
bitStream->Read(value);
|
||||
}
|
||||
|
||||
void handle(const RakNet::RakNetGUID& source, NetEventCallback* callback) {
|
||||
callback->handle(source, (ContainerSetDataPacket*)this);
|
||||
}
|
||||
|
||||
short id;
|
||||
short value;
|
||||
unsigned char containerId;
|
||||
};
|
||||
|
||||
#endif /*NET_MINECRAFT_NETWORK_PACKET__ContainerSetDataPacket_H__*/
|
||||
Reference in New Issue
Block a user