the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 52 lines 1.4 kB view raw
1#include "stdafx.h" 2#include "net.minecraft.h" 3#include "net.minecraft.world.level.material.h" 4#include "net.minecraft.world.h" 5#include "SandStoneTile.h" 6 7const wstring SandStoneTile::TEXTURE_TOP = L"sandstone_top"; 8const wstring SandStoneTile::TEXTURE_BOTTOM = L"sandstone_bottom"; 9const wstring SandStoneTile::TEXTURE_NAMES[] = {L"sandstone_side", L"sandstone_carved", L"sandstone_smooth"}; 10 11int SandStoneTile::SANDSTONE_NAMES[SANDSTONE_BLOCK_NAMES] = { 12 IDS_TILE_SANDSTONE, IDS_TILE_SANDSTONE_CHISELED, IDS_TILE_SANDSTONE_SMOOTH 13}; 14 15SandStoneTile::SandStoneTile(int id) : Tile(id, Material::stone) 16{ 17 icons = NULL; 18 iconTop = NULL; 19 iconBottom = NULL; 20} 21 22Icon *SandStoneTile::getTexture(int face, int data) 23{ 24 if (face == Facing::UP || (face == Facing::DOWN && (data == TYPE_HEIROGLYPHS || data == TYPE_SMOOTHSIDE))) 25 { 26 return iconTop; 27 } 28 if (face == Facing::DOWN) 29 { 30 return iconBottom; 31 } 32 if (data < 0 || data >= SANDSTONE_TILE_TEXTURE_COUNT) data = 0; 33 return icons[data]; 34} 35 36int SandStoneTile::getSpawnResourcesAuxValue(int data) 37{ 38 return data; 39} 40 41void SandStoneTile::registerIcons(IconRegister *iconRegister) 42{ 43 icons = new Icon*[SANDSTONE_TILE_TEXTURE_COUNT]; 44 45 for (int i = 0; i < SANDSTONE_TILE_TEXTURE_COUNT; i++) 46 { 47 icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]); 48 } 49 50 iconTop = iconRegister->registerIcon(TEXTURE_TOP); 51 iconBottom = iconRegister->registerIcon(TEXTURE_BOTTOM); 52}