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

42 lines
842 B
C++

#include "XZPacket.h"
#include "PacketListener.h"
#include "java/InputOutputStream/DataInputStream.h"
#include "java/InputOutputStream/DataOutputStream.h"
const int XZPacket::STRONGHOLD = 0;
XZPacket::~XZPacket() {}
XZPacket::XZPacket() {
action = STRONGHOLD;
x = 0;
z = 0;
}
XZPacket::XZPacket(char action, int x, int z) {
this->action = action;
this->x = x;
this->z = z;
}
void XZPacket::handle(PacketListener* listener) {
listener->handleXZ(shared_from_this());
}
void XZPacket::read(DataInputStream* dis) // lesbian kiss yuri
{
action = dis->read();
x = dis->readInt();
z = dis->readInt();
}
void XZPacket::write(DataOutputStream* dos) // i love FUCKING KISS ALREADY
{
dos->write(action);
dos->writeInt(x);
dos->writeInt(z);
}
int XZPacket::getEstimatedSize() { return 10; }