aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/DebugOptionsPacket.cpp
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/DebugOptionsPacket.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/DebugOptionsPacket.cpp')
-rw-r--r--Minecraft.World/DebugOptionsPacket.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/Minecraft.World/DebugOptionsPacket.cpp b/Minecraft.World/DebugOptionsPacket.cpp
new file mode 100644
index 00000000..f287efcd
--- /dev/null
+++ b/Minecraft.World/DebugOptionsPacket.cpp
@@ -0,0 +1,42 @@
+#include "stdafx.h"
+#include <iostream>
+#include "InputOutputStream.h"
+#include "net.minecraft.world.item.h"
+#include "PacketListener.h"
+#include "DebugOptionsPacket.h"
+
+
+
+DebugOptionsPacket::~DebugOptionsPacket()
+{
+}
+
+DebugOptionsPacket::DebugOptionsPacket()
+{
+ m_uiVal = 0L;
+}
+
+DebugOptionsPacket::DebugOptionsPacket(unsigned int uiVal)
+{
+ this->m_uiVal = uiVal;
+}
+
+void DebugOptionsPacket::handle(PacketListener *listener)
+{
+ listener->handleDebugOptions(shared_from_this());
+}
+
+void DebugOptionsPacket::read(DataInputStream *dis) //throws IOException
+{
+ m_uiVal = (unsigned int)dis->readInt();
+}
+
+void DebugOptionsPacket::write(DataOutputStream *dos) // throws IOException
+{
+ dos->writeInt((int)m_uiVal);
+}
+
+int DebugOptionsPacket::getEstimatedSize()
+{
+ return sizeof(int);
+}