the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 45 lines 1.3 kB view raw
1#include "stdafx.h" 2#include "SmoothStoneBrickTile.h" 3#include "net.minecraft.world.h" 4 5const wstring SmoothStoneBrickTile::TEXTURE_NAMES[] = {L"", L"mossy", L"cracked", L"carved"}; 6 7const unsigned int SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[SMOOTH_STONE_BRICK_NAMES_LENGTH] = { IDS_TILE_STONE_BRICK_SMOOTH, 8 IDS_TILE_STONE_BRICK_SMOOTH_MOSSY, 9 IDS_TILE_STONE_BRICK_SMOOTH_CRACKED, 10 IDS_TILE_STONE_BRICK_SMOOTH_CHISELED 11 }; 12 13SmoothStoneBrickTile::SmoothStoneBrickTile(int id) : Tile(id, Material::stone) 14{ 15 icons = NULL; 16} 17 18Icon *SmoothStoneBrickTile::getTexture(int face, int data) 19{ 20 if (data < 0 || data >= SMOOTH_STONE_BRICK_NAMES_LENGTH) data = 0; 21 return icons[data]; 22} 23 24int SmoothStoneBrickTile::getSpawnResourcesAuxValue(int data) 25{ 26 return data; 27} 28 29unsigned int SmoothStoneBrickTile::getDescriptionId(int iData /*= -1*/) 30{ 31 if(iData < 0 ) iData = 0; 32 return SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[iData]; 33} 34 35void SmoothStoneBrickTile::registerIcons(IconRegister *iconRegister) 36{ 37 icons = new Icon*[SMOOTH_STONE_BRICK_NAMES_LENGTH]; 38 39 for (int i = 0; i < SMOOTH_STONE_BRICK_NAMES_LENGTH; i++) 40 { 41 wstring name = getIconName(); 42 if (!TEXTURE_NAMES[i].empty() ) name += L"_" + TEXTURE_NAMES[i]; 43 icons[i] = iconRegister->registerIcon(name); 44 } 45}