first commit

This commit is contained in:
murdle
2026-03-01 02:38:58 +02:00
commit 19250b9db4
19111 changed files with 4358159 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);
};