mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 12:43:37 +00:00
32 lines
834 B
C++
32 lines
834 B
C++
#pragma once
|
|
|
|
#include "Packet.h"
|
|
|
|
class ContainerSetSlotPacket
|
|
: public Packet,
|
|
public std::enable_shared_from_this<ContainerSetSlotPacket> {
|
|
public:
|
|
static const int CONTAINER;
|
|
static const int WORKBENCH;
|
|
static const int FURNACE;
|
|
|
|
int containerId;
|
|
int slot;
|
|
std::shared_ptr<ItemInstance> item;
|
|
|
|
ContainerSetSlotPacket();
|
|
ContainerSetSlotPacket(int containerId, int slot,
|
|
std::shared_ptr<ItemInstance> item);
|
|
|
|
virtual void handle(PacketListener* listener);
|
|
virtual void read(DataInputStream* dis);
|
|
virtual void write(DataOutputStream* dos);
|
|
virtual int getEstimatedSize();
|
|
|
|
public:
|
|
static std::shared_ptr<Packet> create() {
|
|
return std::shared_ptr<Packet>(new ContainerSetSlotPacket());
|
|
}
|
|
virtual int getId() { return 103; }
|
|
};
|