the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2
3#include "TilePos.h"
4#include "Vec3.h"
5
6TilePos::TilePos(int x, int y, int z)
7{
8 this->x = x;
9 this->y = y;
10 this->z = z;
11}
12
13// 4J - brought forward from 1.2.3
14TilePos::TilePos(Vec3 *p)
15{
16 this->x = Mth::floor(p->x);
17 this->y = Mth::floor(p->y);
18 this->z = Mth::floor(p->z);
19}
20
21int TilePos::hash_fnct(const TilePos &k)
22{
23 return k.x * 8976890 + k.y * 981131 + k.z;
24}
25
26bool TilePos::eq_test(const TilePos &x, const TilePos &y)
27{
28 return x.x == y.x && x.y == y.y && x.z == y.z;
29}