mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-04 18:13:00 +00:00
33 lines
840 B
C++
33 lines
840 B
C++
#pragma once
|
|
|
|
#include <format>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
#include "Packet.h"
|
|
#include "Minecraft.World/net/minecraft/network/packet/Packet.h"
|
|
|
|
class ComplexItemDataPacket
|
|
: public Packet,
|
|
public std::enable_shared_from_this<ComplexItemDataPacket> {
|
|
public:
|
|
short itemType;
|
|
short itemId;
|
|
std::vector<char> data;
|
|
|
|
ComplexItemDataPacket();
|
|
~ComplexItemDataPacket();
|
|
ComplexItemDataPacket(short itemType, short itemId, std::vector<char>& data);
|
|
|
|
virtual void read(DataInputStream* dis);
|
|
virtual void write(DataOutputStream* dos);
|
|
virtual void handle(PacketListener* listener);
|
|
virtual int getEstimatedSize();
|
|
|
|
public:
|
|
static std::shared_ptr<Packet> create() {
|
|
return std::shared_ptr<Packet>(new ComplexItemDataPacket());
|
|
}
|
|
virtual int getId() { return 131; }
|
|
};
|