Files
MinecraftConsoles/Minecraft.World/MapItem.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

24 lines
999 B
C++

#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 std::shared_ptr<MapItemSavedData> getSavedData(short idNum, Level *level);
std::shared_ptr<MapItemSavedData> getSavedData(std::shared_ptr<ItemInstance> itemInstance, Level *level);
void update(Level *level, std::shared_ptr<Entity> player, std::shared_ptr<MapItemSavedData> data);
virtual void inventoryTick(std::shared_ptr<ItemInstance> itemInstance, Level *level, std::shared_ptr<Entity> owner, int slot, bool selected);
virtual void onCraftedBy(std::shared_ptr<ItemInstance> itemInstance, Level *level, std::shared_ptr<Player> player);
std::shared_ptr<Packet> getUpdatePacket(std::shared_ptr<ItemInstance> itemInstance, Level *level, std::shared_ptr<Player> player);
};