the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 33 lines 642 B view raw
1#include "stdafx.h" 2 3#include "net.minecraft.world.entity.h" 4#include "HitResult.h" 5 6HitResult::HitResult(int x, int y, int z, int f, Vec3 *pos) 7{ 8 type = TILE; 9 this->x = x; 10 this->y = y; 11 this->z = z; 12 this->f = f; 13 this->pos = Vec3::newTemp(pos->x, pos->y, pos->z); 14 15 this->entity = nullptr; 16} 17 18HitResult::HitResult(shared_ptr<Entity> entity) 19{ 20 type = ENTITY; 21 this->entity = entity; 22 pos = Vec3::newTemp(entity->x, entity->y, entity->z); 23 24 x = y = z = f = 0; 25} 26 27double HitResult::distanceTo(shared_ptr<Entity> e) 28{ 29 double xd = pos->x - e->x; 30 double yd = pos->y - e->y; 31 double zd = pos->z - e->z; 32 return xd * xd + yd * yd + zd * zd; 33}