chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -4,45 +4,39 @@
#include "PacketListener.h"
#include "ContainerOpenPacket.h"
ContainerOpenPacket::ContainerOpenPacket()
{
containerId = 0;
type = 0;
title = 0;
size = 0;
ContainerOpenPacket::ContainerOpenPacket() {
containerId = 0;
type = 0;
title = 0;
size = 0;
}
ContainerOpenPacket::ContainerOpenPacket(int containerId, int type, int title, int size)
{
this->containerId = containerId;
this->type = type;
this->title = title;
this->size = size;
ContainerOpenPacket::ContainerOpenPacket(int containerId, int type, int title,
int size) {
this->containerId = containerId;
this->type = type;
this->title = title;
this->size = size;
}
void ContainerOpenPacket::handle(PacketListener *listener)
{
listener->handleContainerOpen(shared_from_this());
void ContainerOpenPacket::handle(PacketListener* listener) {
listener->handleContainerOpen(shared_from_this());
}
void ContainerOpenPacket::read(DataInputStream *dis) //throws IOException
void ContainerOpenPacket::read(DataInputStream* dis) // throws IOException
{
containerId = (int)(dis->readByte() & (uint8_t)0xff);
type = (int)(dis->readByte() & (uint8_t)0xff);
title = dis->readShort();
size = (int)(dis->readByte() & (uint8_t)0xff);
containerId = (int)(dis->readByte() & (uint8_t)0xff);
type = (int)(dis->readByte() & (uint8_t)0xff);
title = dis->readShort();
size = (int)(dis->readByte() & (uint8_t)0xff);
}
void ContainerOpenPacket::write(DataOutputStream *dos) //throws IOException
void ContainerOpenPacket::write(DataOutputStream* dos) // throws IOException
{
dos->writeByte((uint8_t)containerId & (uint8_t)0xff);
dos->writeByte((uint8_t)type & (uint8_t)0xff);
dos->writeShort(title & 0xffff);
dos->writeByte((uint8_t)size & (uint8_t)0xff);
dos->writeByte((uint8_t)containerId & (uint8_t)0xff);
dos->writeByte((uint8_t)type & (uint8_t)0xff);
dos->writeShort(title & 0xffff);
dos->writeByte((uint8_t)size & (uint8_t)0xff);
}
int ContainerOpenPacket::getEstimatedSize()
{
return 5;
}
int ContainerOpenPacket::getEstimatedSize() { return 5; }