the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 56 lines 1.3 kB view raw
1#include "stdafx.h" 2#include "WoodTile.h" 3#include "TreeTile.h" 4#include "net.minecraft.world.level.h" 5#include "net.minecraft.world.level.biome.h" 6#include "net.minecraft.world.item.h" 7#include "net.minecraft.stats.h" 8#include "net.minecraft.world.h" 9 10const unsigned int WoodTile::WOOD_NAMES[WOOD_NAMES_LENGTH] = { IDS_TILE_OAKWOOD_PLANKS, 11 IDS_TILE_SPRUCEWOOD_PLANKS, 12 IDS_TILE_BIRCHWOOD_PLANKS, 13 IDS_TILE_JUNGLE_PLANKS, 14}; 15 16const wstring WoodTile::TEXTURE_NAMES[] = {L"oak", L"spruce", L"birch", L"jungle"}; 17 18// public static final String[] WOOD_NAMES = { 19// "oak", "spruce", "birch", "jungle" 20// }; 21 22WoodTile::WoodTile(int id) : Tile(id, Material::wood) 23{ 24 icons = NULL; 25} 26 27unsigned int WoodTile::getDescriptionId(int iData) 28{ 29 if(iData < 0 || iData >= WOOD_NAMES_LENGTH) iData = 0; 30 31 return WOOD_NAMES[iData]; 32} 33 34Icon *WoodTile::getTexture(int face, int data) 35{ 36 if (data < 0 || data >= WOOD_NAMES_LENGTH) 37 { 38 data = 0; 39 } 40 return icons[data]; 41} 42 43int WoodTile::getSpawnResourcesAuxValue(int data) 44{ 45 return data; 46} 47 48void WoodTile::registerIcons(IconRegister *iconRegister) 49{ 50 icons = new Icon*[WOOD_NAMES_LENGTH]; 51 52 for (int i = 0; i < WOOD_NAMES_LENGTH; i++) 53 { 54 icons[i] = iconRegister->registerIcon(getIconName() + L"_" + TEXTURE_NAMES[i]); 55 } 56}