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

@@ -1,58 +1,62 @@
#pragma once
#include "Packet.h"
class AddEntityPacket : public Packet, public std::enable_shared_from_this<AddEntityPacket>
{
class AddEntityPacket : public Packet,
public std::enable_shared_from_this<AddEntityPacket> {
public:
static const int BOAT = 1;
static const int ITEM = 2;
static const int BOAT = 1;
static const int ITEM = 2;
static const int MINECART_RIDEABLE = 10;
static const int MINECART_CHEST = 11;
static const int MINECART_FURNACE = 12;
static const int PRIMED_TNT = 50;
static const int ENDER_CRYSTAL = 51;
static const int ENDER_CRYSTAL = 51;
static const int ARROW = 60;
static const int SNOWBALL = 61;
static const int EGG = 62;
static const int FIREBALL = 63;
static const int SMALL_FIREBALL = 64;
static const int THROWN_ENDERPEARL = 65;
static const int SMALL_FIREBALL = 64;
static const int THROWN_ENDERPEARL = 65;
static const int FALLING = 70;
static const int ITEM_FRAME = 71;
static const int EYEOFENDERSIGNAL = 72;
static const int THROWN_POTION = 73;
static const int FALLING_EGG = 74;
static const int THROWN_EXPBOTTLE = 75;
static const int ITEM_FRAME = 71;
static const int EYEOFENDERSIGNAL = 72;
static const int THROWN_POTION = 73;
static const int FALLING_EGG = 74;
static const int THROWN_EXPBOTTLE = 75;
static const int FISH_HOOK = 90;
static const int FISH_HOOK = 90;
// 4J Added TU9
static const int DRAGON_FIRE_BALL = 200;
// 4J Added TU9
static const int DRAGON_FIRE_BALL = 200;
int id;
int x, y, z;
int xa, ya, za;
int type;
int data;
uint8_t yRot,xRot; // 4J added
uint8_t yRot, xRot; // 4J added
private:
void _init(std::shared_ptr<Entity> e, int type, int data, int xp, int yp, int zp, int yRotp, int xRotp );
void _init(std::shared_ptr<Entity> e, int type, int data, int xp, int yp,
int zp, int yRotp, int xRotp);
public:
AddEntityPacket();
AddEntityPacket(std::shared_ptr<Entity> e, int type, int yRotp, int xRotp, int xp, int yp, int zp);
AddEntityPacket(std::shared_ptr<Entity> e, int type, int data, int yRotp, int xRotp, int xp, int yp, int zp );
AddEntityPacket();
AddEntityPacket(std::shared_ptr<Entity> e, int type, int yRotp, int xRotp,
int xp, int yp, int zp);
AddEntityPacket(std::shared_ptr<Entity> e, int type, int data, int yRotp,
int xRotp, int xp, int yp, int zp);
virtual void read(DataInputStream *dis);
virtual void write(DataOutputStream *dos);
virtual void handle(PacketListener *listener);
virtual int getEstimatedSize();
virtual void read(DataInputStream* dis);
virtual void write(DataOutputStream* dos);
virtual void handle(PacketListener* listener);
virtual int getEstimatedSize();
public:
static std::shared_ptr<Packet> create() { return std::shared_ptr<Packet>(new AddEntityPacket()); }
virtual int getId() { return 23; }
static std::shared_ptr<Packet> create() {
return std::shared_ptr<Packet>(new AddEntityPacket());
}
virtual int getId() { return 23; }
};