the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 41 lines 1.1 kB view raw
1#include "stdafx.h" 2#include "ClockItem.h" 3#include "..\Minecraft.Client\Minecraft.h" 4#include "..\Minecraft.Client\MultiPlayerLocalPlayer.h" 5#include "net.minecraft.world.h" 6 7#ifdef __PSVITA__ 8const wstring ClockItem::TEXTURE_PLAYER_ICON[XUSER_MAX_COUNT] = {L"clockP0"}; 9#else 10const wstring ClockItem::TEXTURE_PLAYER_ICON[XUSER_MAX_COUNT] = {L"clockP0",L"clockP1",L"clockP2",L"clockP3"}; 11#endif 12 13ClockItem::ClockItem(int id) : Item(id) 14{ 15 icons = NULL; 16} 17 18// 4J Added so that we can override the icon id used to calculate the texture UV's for each player 19Icon *ClockItem::getIcon(int auxValue) 20{ 21 Icon *icon = Item::getIcon(auxValue); 22 Minecraft *pMinecraft = Minecraft::GetInstance(); 23 24 if( pMinecraft->player != NULL && auxValue == 0 ) 25 { 26 icon = icons[pMinecraft->player->GetXboxPad()]; 27 } 28 return icon; 29} 30 31void ClockItem::registerIcons(IconRegister *iconRegister) 32{ 33 Item::registerIcons(iconRegister); 34 35 icons = new Icon *[XUSER_MAX_COUNT]; 36 37 for (int i = 0; i < XUSER_MAX_COUNT; i++) 38 { 39 icons[i] = iconRegister->registerIcon(TEXTURE_PLAYER_ICON[i]); 40 } 41}