From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: feat: TU19 (Dec 2014) Features & Content (#155) * try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki --- Minecraft.World/CommandBlockEntity.h | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Minecraft.World/CommandBlockEntity.h (limited to 'Minecraft.World/CommandBlockEntity.h') diff --git a/Minecraft.World/CommandBlockEntity.h b/Minecraft.World/CommandBlockEntity.h new file mode 100644 index 00000000..3a3c10b6 --- /dev/null +++ b/Minecraft.World/CommandBlockEntity.h @@ -0,0 +1,41 @@ +#pragma once + +#include "TileEntity.h" +#include "CommandSender.h" + +class ChatMessageComponent; + +class CommandBlockEntity : public TileEntity, public CommandSender +{ +public: + eINSTANCEOF GetType() { return eTYPE_COMMANDBLOCKTILEENTITY; } + static TileEntity *create() { return new CommandBlockEntity(); } + + // 4J Added + virtual shared_ptr clone(); + +private: + int successCount; + wstring command; + wstring name; + +public: + CommandBlockEntity(); + + void setCommand(const wstring &command); + wstring getCommand(); + int performCommand(Level *level); + wstring getName(); + void setName(const wstring &name); + virtual void sendMessage(const wstring& message, ChatPacket::EChatPacketMessage type = ChatPacket::e_ChatCustom, int customData = -1, const wstring& additionalMessage = L""); + virtual bool hasPermission(EGameCommand command); + //void sendMessage(ChatMessageComponent *message); + //bool hasPermission(int permissionLevel, const wstring &commandName); + void save(CompoundTag *tag); + void load(CompoundTag *tag); + Pos *getCommandSenderWorldPosition(); + Level *getCommandSenderWorld(); + shared_ptr getUpdatePacket(); + int getSuccessCount(); + void setSuccessCount(int successCount); +}; \ No newline at end of file -- cgit v1.2.3