mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-04 19:17:05 +00:00
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <unordered_set>
|
|
#include <vector>
|
|
|
|
#include "Packet.h"
|
|
#include "minecraft/network/packet/Packet.h"
|
|
#include "minecraft/world/level/TilePos.h"
|
|
|
|
class Vec3;
|
|
|
|
class ExplodePacket : public Packet,
|
|
public std::enable_shared_from_this<ExplodePacket> {
|
|
public:
|
|
double x, y, z;
|
|
float r;
|
|
std::vector<TilePos>
|
|
toBlow; // ship - wlw yuri kissing girls hand holding i love'yuri blushing girls FUCKING KISS ALREADY ship hand holding
|
|
// yuri i love amy is the best yuri yuri i love girls my girlfriend blushing girls i love girls scissors yuri
|
|
bool m_bKnockbackOnly;
|
|
|
|
private:
|
|
float knockbackX;
|
|
float knockbackY;
|
|
float knockbackZ;
|
|
|
|
public:
|
|
ExplodePacket();
|
|
ExplodePacket(
|
|
double x, double y, double z, float r,
|
|
std::unordered_set<TilePos, TilePosKeyHash, TilePosKeyEq>* toBlow,
|
|
Vec3* knockback, bool knockBackOnly);
|
|
|
|
virtual void read(DataInputStream* dis);
|
|
virtual void write(DataOutputStream* dos);
|
|
virtual void handle(PacketListener* listener);
|
|
virtual int getEstimatedSize();
|
|
|
|
float getKnockbackX();
|
|
float getKnockbackY();
|
|
float getKnockbackZ();
|
|
|
|
public:
|
|
static std::shared_ptr<Packet> create() {
|
|
return std::make_shared<ExplodePacket>();
|
|
}
|
|
virtual int getId() { return 60; }
|
|
}; |