the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "DirectionalTile.h"
3
4class Pos;
5class Player;
6class Random;
7class Level;
8
9class BedTile : public DirectionalTile
10{
11private:
12 static const int PART_FOOT = 0;
13 static const int PART_HEAD = 1;
14
15 Icon **iconEnd;
16 Icon **iconSide;
17 Icon **iconTop;
18
19public:
20 static const int HEAD_PIECE_DATA = 0x8;
21 static const int OCCUPIED_DATA = 0x4;
22
23 static int HEAD_DIRECTION_OFFSETS[4][2];
24
25 BedTile(int id);
26
27 virtual void updateDefaultShape();
28 virtual bool TestUse(Level *level, int x, int y, int z, shared_ptr<Player> player);
29 virtual bool use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly = false); // 4J added soundOnly param
30 virtual Icon *getTexture(int face, int data);
31 //@Override
32 void registerIcons(IconRegister *iconRegister);
33 virtual int getRenderShape();
34 virtual bool isCubeShaped();
35 virtual bool isSolidRender(bool isServerLevel = false);
36 virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param
37 virtual void neighborChanged(Level *level, int x, int y, int z, int type);
38 virtual int getResource(int data, Random *random,int playerBonusLevel);
39
40private:
41 using Tile::setShape;
42 void setShape();
43
44public:
45 static bool isHeadPiece(int data);
46 static bool isOccupied(int data);
47 static void setOccupied(Level *level, int x, int y, int z, bool occupied);
48 static Pos *findStandUpPosition(Level *level, int x, int y, int z, int skipCount);
49
50 virtual void spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonus);
51 virtual int getPistonPushReaction();
52 virtual int cloneTileId(Level *level, int x, int y, int z);
53 virtual void playerWillDestroy(Level *level, int x, int y, int z, int data, shared_ptr<Player> player);
54};