mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-25 12:26:54 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -4,42 +4,35 @@
|
||||
#include "PacketListener.h"
|
||||
#include "ContainerSetDataPacket.h"
|
||||
|
||||
|
||||
|
||||
ContainerSetDataPacket::ContainerSetDataPacket()
|
||||
{
|
||||
containerId = 0;
|
||||
id = -1;
|
||||
value = 0;
|
||||
ContainerSetDataPacket::ContainerSetDataPacket() {
|
||||
containerId = 0;
|
||||
id = -1;
|
||||
value = 0;
|
||||
}
|
||||
|
||||
ContainerSetDataPacket::ContainerSetDataPacket(int containerId, int id, int value)
|
||||
{
|
||||
this->containerId = containerId;
|
||||
this->id = id;
|
||||
this->value = value;
|
||||
ContainerSetDataPacket::ContainerSetDataPacket(int containerId, int id,
|
||||
int value) {
|
||||
this->containerId = containerId;
|
||||
this->id = id;
|
||||
this->value = value;
|
||||
}
|
||||
|
||||
void ContainerSetDataPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleContainerSetData(shared_from_this());
|
||||
void ContainerSetDataPacket::handle(PacketListener* listener) {
|
||||
listener->handleContainerSetData(shared_from_this());
|
||||
}
|
||||
|
||||
void ContainerSetDataPacket::read(DataInputStream *dis) //throws IOException
|
||||
void ContainerSetDataPacket::read(DataInputStream* dis) // throws IOException
|
||||
{
|
||||
containerId = (int)dis->readByte();
|
||||
id = dis->readShort();
|
||||
value = dis->readShort();
|
||||
containerId = (int)dis->readByte();
|
||||
id = dis->readShort();
|
||||
value = dis->readShort();
|
||||
}
|
||||
|
||||
void ContainerSetDataPacket::write(DataOutputStream *dos) // throws IOException
|
||||
void ContainerSetDataPacket::write(DataOutputStream* dos) // throws IOException
|
||||
{
|
||||
dos->writeByte((uint8_t)containerId);
|
||||
dos->writeShort(id);
|
||||
dos->writeShort(value);
|
||||
dos->writeByte((uint8_t)containerId);
|
||||
dos->writeShort(id);
|
||||
dos->writeShort(value);
|
||||
}
|
||||
|
||||
int ContainerSetDataPacket::getEstimatedSize()
|
||||
{
|
||||
return 1 + 4;
|
||||
}
|
||||
int ContainerSetDataPacket::getEstimatedSize() { return 1 + 4; }
|
||||
|
||||
Reference in New Issue
Block a user