From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/GameEventPacket.h | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Minecraft.World/GameEventPacket.h (limited to 'Minecraft.World/GameEventPacket.h') diff --git a/Minecraft.World/GameEventPacket.h b/Minecraft.World/GameEventPacket.h new file mode 100644 index 00000000..93ea911c --- /dev/null +++ b/Minecraft.World/GameEventPacket.h @@ -0,0 +1,45 @@ +#pragma once +using namespace std; + +#include "Packet.h" + +class GameEventPacket : public Packet, public enable_shared_from_this +{ + +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 create() { return shared_ptr(new GameEventPacket()); } + virtual int getId() { return 70; } +}; \ No newline at end of file -- cgit v1.2.3