aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/SignTileEntity.h
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/SignTileEntity.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/SignTileEntity.h')
-rw-r--r--Minecraft.World/SignTileEntity.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Minecraft.World/SignTileEntity.h b/Minecraft.World/SignTileEntity.h
new file mode 100644
index 00000000..b963f12f
--- /dev/null
+++ b/Minecraft.World/SignTileEntity.h
@@ -0,0 +1,49 @@
+#pragma once
+using namespace std;
+
+#include "TileEntity.h"
+
+#define MAX_SIGN_LINES 4
+
+class SignTileEntity : public TileEntity
+{
+public:
+ eINSTANCEOF GetType() { return eTYPE_SIGNTILEENTITY; }
+ static TileEntity *create() { return new SignTileEntity(); }
+public:
+ static const int MAX_LINE_LENGTH;
+
+public:
+ SignTileEntity();
+ virtual ~SignTileEntity();
+ wstring GetMessage(int i) { return m_wsmessages[i];}
+ wstring *GetMessages() { return m_wsmessages;}
+ void SetMessage(int iIndex,wstring &wsText);
+ int GetSelectedLine() {return m_iSelectedLine;}
+ void SetSelectedLine(int iLine) {m_iSelectedLine=iLine;}
+ bool IsVerified() {return m_bVerified;}
+ void SetVerified(bool bVerified) {m_bVerified=bVerified;}
+ bool IsCensored() {return m_bCensored;}
+ void SetCensored(bool bCensored) {m_bCensored=bCensored;}
+public:
+
+private:
+ bool _isEditable;
+ bool m_bVerified;
+ bool m_bCensored;
+ int m_iSelectedLine;
+
+ wstring m_wsmessages[MAX_SIGN_LINES];
+
+public:
+ virtual void save(CompoundTag *tag);
+ virtual void load(CompoundTag *tag);
+ virtual shared_ptr<Packet> getUpdatePacket();
+ bool isEditable();
+ void setEditable(bool isEditable);
+ virtual void setChanged();
+ static int StringVerifyCallback(LPVOID lpParam,STRING_VERIFY_RESPONSE *pResults);
+
+ // 4J Added
+ virtual shared_ptr<TileEntity> clone();
+}; \ No newline at end of file