4jcraft/minecraft/Minecraft.World/net/minecraft/network/packet/SetEntityLinkPacket.h
MatthewBeshay 2f92b07c1f
Some checks are pending
Build (Linux, x86-64) / build-linux (push) Waiting to run
Format Check / clang-format (push) Waiting to run
fix: resolve ByteBuffer hardcoded path and static const linker errors
2026-03-31 21:50:15 +11:00

36 lines
988 B
C++

#pragma once
#include <memory>
#include "Packet.h"
#include "Minecraft.World/net/minecraft/network/packet/Packet.h"
class Entity;
class SetEntityLinkPacket
: public Packet,
public std::enable_shared_from_this<SetEntityLinkPacket> {
public:
static inline constexpr int RIDING = 0;
static inline constexpr int LEASH = 1;
int type;
int sourceId, destId;
SetEntityLinkPacket();
SetEntityLinkPacket(int linkType, std::shared_ptr<Entity> sourceEntity,
std::shared_ptr<Entity> destEntity);
virtual int getEstimatedSize();
virtual void read(DataInputStream* dis);
virtual void write(DataOutputStream* dos);
virtual void handle(PacketListener* listener);
virtual bool canBeInvalidated();
virtual bool isInvalidatedBy(std::shared_ptr<Packet> packet);
public:
static std::shared_ptr<Packet> create() {
return std::make_shared<SetEntityLinkPacket>();
}
virtual int getId() { return 39; }
};