the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 27 lines 575 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.entity.player.h" 3#include "HealthCriteria.h" 4 5HealthCriteria::HealthCriteria(const wstring &id) : DummyCriteria(id) 6{ 7} 8 9int HealthCriteria::getScoreModifier(vector<shared_ptr<Player> > *players) 10{ 11 float health = 0; 12 13 for (AUTO_VAR(it,players->begin()); it != players->end(); ++it) 14 { 15 shared_ptr<Player> player = *it; 16 health += player->getHealth() + player->getAbsorptionAmount(); 17 } 18 19 if (players->size() > 0) health /= players->size(); 20 21 return Mth::ceil(health); 22} 23 24bool HealthCriteria::isReadOnly() 25{ 26 return true; 27}