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/ResultSlot.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Minecraft.World/ResultSlot.h (limited to 'Minecraft.World/ResultSlot.h') diff --git a/Minecraft.World/ResultSlot.h b/Minecraft.World/ResultSlot.h new file mode 100644 index 00000000..28e464f0 --- /dev/null +++ b/Minecraft.World/ResultSlot.h @@ -0,0 +1,26 @@ +#pragma once + +#include "Slot.h" + +class ResultSlot : public Slot +{ +private: + shared_ptr craftSlots; + Player *player; // This can't be a shared_ptr, as we create a result slot in the inventorymenu in the Player ctor + int removeCount; + +public: + ResultSlot(Player *player, shared_ptr craftSlots, shared_ptr container, int id, int x, int y); + virtual ~ResultSlot() {} + + virtual bool mayPlace(shared_ptr item); + virtual shared_ptr remove(int c); + +protected: + virtual void onQuickCraft(shared_ptr picked, int count); + virtual void checkTakeAchievements(shared_ptr carried); + +public: + virtual void onTake(shared_ptr player, shared_ptr carried); + virtual bool mayCombine(shared_ptr item); // 4J Added +}; \ No newline at end of file -- cgit v1.2.3