the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 19 lines 501 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.entity.player.h" 3#include "net.minecraft.world.entity.npc.h" 4#include "LookAtTradingPlayerGoal.h" 5 6LookAtTradingPlayerGoal::LookAtTradingPlayerGoal(Villager *villager) : LookAtPlayerGoal((Mob *)villager, typeid(Player), 8) 7{ 8 this->villager = villager; 9} 10 11bool LookAtTradingPlayerGoal::canUse() 12{ 13 if (villager->isTrading()) 14 { 15 lookAt = weak_ptr<Entity>(dynamic_pointer_cast<Entity>(villager->getTradingPlayer())); 16 return true; 17 } 18 return false; 19}