Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
575 B · 27 lines
C++
at main
123456789101112131415161718192021222324252627#include "stdafx.h"#include "net.minecraft.world.entity.player.h"#include "HealthCriteria.h"
HealthCriteria::HealthCriteria(const wstring &id) : DummyCriteria(id){}
int HealthCriteria::getScoreModifier(vector<shared_ptr<Player> > *players){ float health = 0;
for (AUTO_VAR(it,players->begin()); it != players->end(); ++it) { shared_ptr<Player> player = *it; health += player->getHealth() + player->getAbsorptionAmount(); }
if (players->size() > 0) health /= players->size();
return Mth::ceil(health);}
bool HealthCriteria::isReadOnly(){ return true;}