the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3#include "Entity.h"
4#include "HangingEntity.h"
5
6class Level;
7
8class ItemFrame : public HangingEntity
9{
10public:
11 eINSTANCEOF GetType() { return eTYPE_ITEM_FRAME; };
12 static Entity *create(Level *level) { return new ItemFrame(level); }
13private:
14 static const int DATA_ITEM = 2;
15 static const int DATA_ROTATION = 3;
16
17 float dropChance;
18
19private:
20
21 void _init();
22
23public:
24 ItemFrame(Level *level);
25 ItemFrame(Level *level, int xTile, int yTile, int zTile, int dir);
26
27protected:
28 virtual void defineSynchedData();
29
30public:
31 virtual int getWidth() {return 9;}
32 virtual int getHeight() {return 9;}
33 virtual bool shouldRenderAtSqrDistance(double distance);
34 virtual void dropItem(shared_ptr<Entity> causedBy);
35
36private:
37 void removeFramedMap(shared_ptr<ItemInstance> item);
38
39public:
40 shared_ptr<ItemInstance> getItem();
41 void setItem(shared_ptr<ItemInstance> item);
42 int getRotation();
43 void setRotation(int rotation);
44
45 virtual void addAdditonalSaveData(CompoundTag *tag);
46 virtual void readAdditionalSaveData(CompoundTag *tag);
47 virtual bool interact(shared_ptr<Player> player);
48};