Files
MinecraftConsoles/Minecraft.World/GameEventPacket.h
ModMaker101 a9be52c41a Project modernization (#630)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
2026-03-08 09:56:03 +07:00

45 lines
1.2 KiB
C++

#pragma once
using namespace std;
#include "Packet.h"
class GameEventPacket : public Packet, public enable_shared_from_this<GameEventPacket>
{
public:
static const int NO_RESPAWN_BED_AVAILABLE;
static const int START_RAINING;
static const int STOP_RAINING;
static const int CHANGE_GAME_MODE; // 1.8.2
static const int WIN_GAME; // 1.0.01
static const int DEMO_EVENT; // 1.3.2
static const int SUCCESSFUL_BOW_HIT = 6;
static const int DEMO_PARAM_INTRO; // 1.3.2
static const int DEMO_PARAM_HINT_1; // 1.3.2
static const int DEMO_PARAM_HINT_2; // 1.3.2
static const int DEMO_PARAM_HINT_3; // 1.3.2
// 4J Added
static const int START_SAVING;
static const int STOP_SAVING;
static const int EVENT_LANGUAGE_ID_LENGTH = 6;
static const int EVENT_LANGUAGE_ID[EVENT_LANGUAGE_ID_LENGTH];
int _event;
int param;
GameEventPacket();
GameEventPacket(int evnt, int param);
virtual void read(DataInputStream *dis);
virtual void write(DataOutputStream *dos);
virtual void handle(PacketListener *listener);
virtual int getEstimatedSize();
public:
static shared_ptr<Packet> create() { return std::make_shared<GameEventPacket>(); }
virtual int getId() { return 70; }
};