mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-27 13:54:39 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -4,44 +4,36 @@
|
||||
#include "PacketListener.h"
|
||||
#include "ChunkVisibilityPacket.h"
|
||||
|
||||
|
||||
|
||||
ChunkVisibilityPacket::ChunkVisibilityPacket()
|
||||
{
|
||||
this->shouldDelay = false;
|
||||
x = 0;
|
||||
z = 0;
|
||||
visible = false;
|
||||
ChunkVisibilityPacket::ChunkVisibilityPacket() {
|
||||
this->shouldDelay = false;
|
||||
x = 0;
|
||||
z = 0;
|
||||
visible = false;
|
||||
}
|
||||
|
||||
ChunkVisibilityPacket::ChunkVisibilityPacket(int x, int z, bool visible)
|
||||
{
|
||||
this->shouldDelay = false;
|
||||
this->x = x;
|
||||
this->z = z;
|
||||
this->visible = visible;
|
||||
ChunkVisibilityPacket::ChunkVisibilityPacket(int x, int z, bool visible) {
|
||||
this->shouldDelay = false;
|
||||
this->x = x;
|
||||
this->z = z;
|
||||
this->visible = visible;
|
||||
}
|
||||
|
||||
void ChunkVisibilityPacket::read(DataInputStream *dis) //throws IOException
|
||||
void ChunkVisibilityPacket::read(DataInputStream* dis) // throws IOException
|
||||
{
|
||||
x = dis->readInt();
|
||||
z = dis->readInt();
|
||||
visible = dis->read() != 0;
|
||||
x = dis->readInt();
|
||||
z = dis->readInt();
|
||||
visible = dis->read() != 0;
|
||||
}
|
||||
|
||||
void ChunkVisibilityPacket::write(DataOutputStream *dos) //throws IOException
|
||||
void ChunkVisibilityPacket::write(DataOutputStream* dos) // throws IOException
|
||||
{
|
||||
dos->writeInt(x);
|
||||
dos->writeInt(z);
|
||||
dos->write(visible ? 1 : 0);
|
||||
dos->writeInt(x);
|
||||
dos->writeInt(z);
|
||||
dos->write(visible ? 1 : 0);
|
||||
}
|
||||
|
||||
void ChunkVisibilityPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleChunkVisibility(shared_from_this());
|
||||
void ChunkVisibilityPacket::handle(PacketListener* listener) {
|
||||
listener->handleChunkVisibility(shared_from_this());
|
||||
}
|
||||
|
||||
int ChunkVisibilityPacket::getEstimatedSize()
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
int ChunkVisibilityPacket::getEstimatedSize() { return 9; }
|
||||
|
||||
Reference in New Issue
Block a user