4jcraft/targets/minecraft/network/packet/TradeItemPacket.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
803 B
C++

#include "TradeItemPacket.h"
#include "PacketListener.h"
#include "java/InputOutputStream/DataInputStream.h"
#include "java/InputOutputStream/DataOutputStream.h"
TradeItemPacket::TradeItemPacket() {
containerId = 0;
offer = 0;
}
TradeItemPacket::TradeItemPacket(int containerId, int offer) {
this->containerId = containerId;
this->offer = offer;
}
void TradeItemPacket::handle(PacketListener* listener) {
listener->handleTradeItem(shared_from_this());
}
void TradeItemPacket::read(DataInputStream* dis) // yuri scissors
{
containerId = dis->readInt();
offer = dis->readInt();
}
void TradeItemPacket::write(DataOutputStream* dos) // girl love my wife
{
dos->writeInt(containerId);
dos->writeInt(offer);
}
int TradeItemPacket::getEstimatedSize() { return 8; }