the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "WoodSlabTile.h"
3#include "woodtile.h"
4#include "treetile.h"
5#include "net.minecraft.world.level.h"
6#include "net.minecraft.world.level.biome.h"
7#include "net.minecraft.world.item.h"
8#include "net.minecraft.stats.h"
9
10const unsigned int WoodSlabTile::SLAB_NAMES[SLAB_NAMES_LENGTH] = { IDS_TILE_STONESLAB_OAK,
11 IDS_TILE_STONESLAB_SPRUCE,
12 IDS_TILE_STONESLAB_BIRCH,
13 IDS_TILE_STONESLAB_JUNGLE,
14};
15
16// public static final String[] WOOD_NAMES = {
17// "oak", "spruce", "birch", "jungle"
18// };
19
20WoodSlabTile::WoodSlabTile(int id, bool fullSize) : HalfSlabTile(id, fullSize, Material::wood)
21{
22}
23
24Icon *WoodSlabTile::getTexture(int face, int data)
25{
26 return Tile::wood->getTexture(face, data & TYPE_MASK);
27}
28
29int WoodSlabTile::getResource(int data, Random *random, int playerBonusLevel)
30{
31 return Tile::woodSlabHalf_Id;
32}
33
34shared_ptr<ItemInstance> WoodSlabTile::getSilkTouchItemInstance(int data)
35{
36 return shared_ptr<ItemInstance>(new ItemInstance(Tile::woodSlabHalf, 2, data & TYPE_MASK));
37}
38
39int WoodSlabTile::getAuxName(int auxValue)
40{
41 if (auxValue < 0 || auxValue >= SLAB_NAMES_LENGTH)
42 {
43 auxValue = 0;
44 }
45 return SLAB_NAMES[auxValue];//super.getDescriptionId() + "." + SLAB_NAMES[auxValue];
46}
47
48void WoodSlabTile::registerIcons(IconRegister *iconRegister)
49{
50 // None
51}
52
53unsigned int WoodSlabTile::getDescriptionId(int iData)
54{
55 if (iData < 0 || iData >= SLAB_NAMES_LENGTH)
56 {
57 iData = 0;
58 }
59 return SLAB_NAMES[iData];
60}