the whole game

This commit is contained in:
Kolyah35
2026-03-02 22:04:18 +03:00
parent 816e9060b4
commit f0617a5d22
2069 changed files with 581500 additions and 0 deletions

34
src/world/phys/HitResult.h Executable file
View File

@@ -0,0 +1,34 @@
#ifndef NET_MINECRAFT_WORLD_PHYS__HitResult_H__
#define NET_MINECRAFT_WORLD_PHYS__HitResult_H__
//package net.minecraft.world.phys;
#include "Vec3.h"
class Entity;
enum HitResultType {
TILE,
ENTITY,
NO_HIT
};
class HitResult
{
public:
HitResult();
HitResult(int x, int y, int z, int f, const Vec3& pos);
HitResult(Entity* entity);
HitResult(const HitResult& hr);
float distanceTo(Entity* entity) const ;
bool isHit() const { return type != NO_HIT; }
HitResultType type;
int x, y, z, f;
Vec3 pos;
Entity* entity;
bool indirectHit; // when targeting the block we're standing on, without actually looking at it
};
#endif /*NET_MINECRAFT_WORLD_PHYS__HitResult_H__*/