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.world.h" 3#include "net.minecraft.world.item.h" 4#include "StainedGlassPaneBlock.h" 5 6Icon *StainedGlassPaneBlock::ICONS[StainedGlassPaneBlock::ICONS_COUNT]; 7Icon *StainedGlassPaneBlock::EDGE_ICONS[StainedGlassPaneBlock::ICONS_COUNT]; 8 9StainedGlassPaneBlock::StainedGlassPaneBlock(int id) : ThinFenceTile(id, L"glass", L"glass_pane_top", Material::glass, false) 10{ 11} 12 13Icon *StainedGlassPaneBlock::getIconTexture(int face, int data) 14{ 15 return ICONS[data % ICONS_COUNT]; 16} 17 18Icon *StainedGlassPaneBlock::getEdgeTexture(int data) 19{ 20 return EDGE_ICONS[~data & 0xF]; 21} 22 23Icon *StainedGlassPaneBlock::getTexture(int face, int data) 24{ 25 return getIconTexture(face, ~data & 0xf); 26} 27 28int StainedGlassPaneBlock::getSpawnResourcesAuxValue(int data) 29{ 30 return data; 31} 32 33int StainedGlassPaneBlock::getItemAuxValueForBlockData(int data) 34{ 35 return (data & 0xf); 36} 37 38 39int StainedGlassPaneBlock::getRenderLayer() 40{ 41 return 1; 42} 43 44void StainedGlassPaneBlock::registerIcons(IconRegister *iconRegister) 45{ 46 ThinFenceTile::registerIcons(iconRegister); 47 for (int i = 0; i < ICONS_COUNT; i++) 48 { 49 ICONS[i] = iconRegister->registerIcon(getIconName() + L"_" + DyePowderItem::COLOR_TEXTURES[getItemAuxValueForBlockData(i)]); 50 EDGE_ICONS[i] = iconRegister->registerIcon(getIconName() + L"_pane_top_" + DyePowderItem::COLOR_TEXTURES[getItemAuxValueForBlockData(i)]); 51 } 52}