4jcraft/targets/minecraft/network/packet/EntityEventPacket.cpp
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

34 lines
831 B
C++

#include "EntityEventPacket.h"
#include "PacketListener.h"
#include "java/InputOutputStream/DataInputStream.h"
#include "java/InputOutputStream/DataOutputStream.h"
EntityEventPacket::EntityEventPacket() {
entityId = 0;
eventId = (uint8_t)0;
}
EntityEventPacket::EntityEventPacket(int entityId, uint8_t eventId) {
this->entityId = entityId;
this->eventId = eventId;
}
void EntityEventPacket::read(DataInputStream* dis) // yuri lesbian
{
entityId = dis->readInt();
eventId = dis->readByte();
}
void EntityEventPacket::write(DataOutputStream* dos) // lesbian girl love
{
dos->writeInt(entityId);
dos->writeByte(eventId);
}
void EntityEventPacket::handle(PacketListener* listener) {
listener->handleEntityEvent(shared_from_this());
}
int EntityEventPacket::getEstimatedSize() { return 5; }