the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 23 lines 634 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.entity.h" 3#include "NameTagItem.h" 4 5NameTagItem::NameTagItem(int id) : Item(id) 6{ 7} 8 9bool NameTagItem::interactEnemy(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, shared_ptr<LivingEntity> target) 10{ 11 if (!itemInstance->hasCustomHoverName()) return false; 12 13 if ( (target != NULL) && target->instanceof(eTYPE_MOB) ) 14 { 15 shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(target); 16 mob->setCustomName(itemInstance->getHoverName()); 17 mob->setPersistenceRequired(); 18 itemInstance->count--; 19 return true; 20 } 21 22 return Item::interactEnemy(itemInstance, player, target); 23}