the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 54 lines 1.1 kB view raw
1#include "stdafx.h" 2#include "net.minecraft.world.item.h" 3#include "net.minecraft.world.h" 4#include "StainedGlassBlock.h" 5 6Icon *StainedGlassBlock::ICONS[StainedGlassBlock::ICONS_LENGTH]; 7 8StainedGlassBlock::StainedGlassBlock(int id, Material *material) : HalfTransparentTile(id, L"glass", material, false) 9{ 10} 11 12Icon *StainedGlassBlock::getTexture(int face, int data) 13{ 14 return ICONS[data % ICONS_LENGTH]; 15} 16 17int StainedGlassBlock::getSpawnResourcesAuxValue(int data) 18{ 19 return data; 20} 21 22int StainedGlassBlock::getItemAuxValueForBlockData(int data) 23{ 24 return (~data & 0xf); 25} 26 27 28int StainedGlassBlock::getRenderLayer() 29{ 30 return 1; 31} 32 33void StainedGlassBlock::registerIcons(IconRegister *iconRegister) 34{ 35 for (int i = 0; i < ICONS_LENGTH; i++) 36 { 37 ICONS[i] = iconRegister->registerIcon(getIconName() + L"_" + DyePowderItem::COLOR_TEXTURES[getItemAuxValueForBlockData(i)]); 38 } 39} 40 41int StainedGlassBlock::getResourceCount(Random *random) 42{ 43 return 0; 44} 45 46bool StainedGlassBlock::isSilkTouchable() 47{ 48 return true; 49} 50 51bool StainedGlassBlock::isCubeShaped() 52{ 53 return false; 54}