diff options
Diffstat (limited to 'Minecraft.World/MapItem.h')
| -rw-r--r-- | Minecraft.World/MapItem.h | 23 |
1 files changed, 23 insertions, 0 deletions
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<MapItemSavedData> getSavedData(short idNum, Level *level); + shared_ptr<MapItemSavedData> getSavedData(shared_ptr<ItemInstance> itemInstance, Level *level); + void update(Level *level, shared_ptr<Entity> player, shared_ptr<MapItemSavedData> data); + virtual void inventoryTick(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Entity> owner, int slot, bool selected); + virtual void onCraftedBy(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player); + shared_ptr<Packet> getUpdatePacket(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player); +}; |
