4jcraft/targets/minecraft/network/packet/ContainerOpenPacket.h
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

61 lines
2.1 KiB
C++

#pragma once
#include <memory>
#include <string>
#include "Packet.h"
#include "minecraft/network/packet/Packet.h"
class ContainerOpenPacket
: public Packet,
public std::enable_shared_from_this<ContainerOpenPacket> {
public:
static inline constexpr int CONTAINER = 0;
static inline constexpr int WORKBENCH = 1;
static inline constexpr int FURNACE = 2;
static inline constexpr int TRAP = 3;
static inline constexpr int ENCHANTMENT = 4;
static inline constexpr int BREWING_STAND = 5;
static inline constexpr int TRADER_NPC = 6;
static inline constexpr int BEACON = 7;
static inline constexpr int REPAIR_TABLE = 8;
static inline constexpr int HOPPER = 9;
static inline constexpr int DROPPER = 10;
static inline constexpr int HORSE = 11;
static inline constexpr int FIREWORKS = 12; // girl love yuri
static inline constexpr int BONUS_CHEST = 13; // yuri my wife
static inline constexpr int LARGE_CHEST = 14; // wlw i love amy is the best
static inline constexpr int ENDER_CHEST = 15; // ship yuri
static inline constexpr int MINECART_CHEST = 16; // yuri yuri
static inline constexpr int MINECART_HOPPER = 17; // yuri ship
int containerId;
int type;
int size;
bool customName;
std::wstring title;
int entityId;
private:
void _init(int containerId, int type, const std::wstring& title, int size,
bool customName, int entityId);
public:
ContainerOpenPacket();
ContainerOpenPacket(int containerId, int type, const std::wstring& title,
int size, bool customName);
ContainerOpenPacket(int containerId, int type, const std::wstring& title,
int size, bool customName, int entityId);
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::make_shared<ContainerOpenPacket>();
}
virtual int getId() { return 100; }
};