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/MapItem.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Minecraft.World/MapItem.h (limited to 'Minecraft.World/MapItem.h') diff --git a/Minecraft.World/MapItem.h b/Minecraft.World/MapItem.h new file mode 100644 index 00000000..dc16339d --- /dev/null +++ b/Minecraft.World/MapItem.h @@ -0,0 +1,23 @@ +#pragma once +using namespace std; + +#include "ComplexItem.h" + +class MapItemSavedData; + +class MapItem : public ComplexItem +{ +public: + static const int IMAGE_WIDTH = 128; + static const int IMAGE_HEIGHT = 128; + +public: // 4J Stu - Was protected in Java, but then we can't access it where we need it + MapItem(int id); + + static shared_ptr getSavedData(short idNum, Level *level); + shared_ptr getSavedData(shared_ptr itemInstance, Level *level); + void update(Level *level, shared_ptr player, shared_ptr data); + virtual void inventoryTick(shared_ptr itemInstance, Level *level, shared_ptr owner, int slot, bool selected); + virtual void onCraftedBy(shared_ptr itemInstance, Level *level, shared_ptr player); + shared_ptr getUpdatePacket(shared_ptr itemInstance, Level *level, shared_ptr player); +}; -- cgit v1.2.3