Initial commit

This commit is contained in:
daoge_cmd
2026-03-01 12:16:08 +08:00
parent def8cb4153
commit b691c43c44
19437 changed files with 4363922 additions and 0 deletions

38
Minecraft.World/Node.h Normal file
View File

@@ -0,0 +1,38 @@
#pragma once
using namespace std;
class Node
{
// 4J Jev, these classes were accessing protected members.
friend class BinaryHeap;
friend class PathFinder;
friend class EnderDragon;
public:
const int x, y, z;
private:
const int hash;
protected:
int heapIdx;
float g, h, f;
Node *cameFrom;
public:
bool closed;
void _init();
eINSTANCEOF GetType() { return eType_NODE;}
Node() : hash(0),x(0),y(0),z(0) {} // 4J - added default constructor so we can make an empty of array of these as a copy target
Node(const int x, const int y, const int z);
static int createHash(const int x, const int y, const int z);
float distanceTo(Node *to);
float distanceToSqr(Node *to);
bool equals(Node *o);
int hashCode();
bool inOpenSet();
wstring toString();
};