Initial commit

This commit is contained in:
daoge_cmd
2026-03-01 12:16:08 +08:00
parent def8cb4153
commit b691c43c44
19437 changed files with 4363922 additions and 0 deletions

23
Minecraft.World/MapItem.h Normal file
View File

@@ -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);
};