LeviLamina
Loading...
Searching...
No Matches
HitResult.h
1
#pragma once
2
3
#include "mc/_HeaderOutputPredefine.h"
4
5
// auto generated inclusion list
6
#include "mc/deps/core/math/Vec3.h"
7
#include "mc/deps/ecs/WeakEntityRef.h"
8
#include "mc/world/level/BlockPos.h"
9
#include "mc/world/phys/AABB.h"
10
#include "mc/world/phys/HitResultType.h"
11
12
// auto generated forward declare list
13
// clang-format off
14
class
Actor
;
15
// clang-format on
16
17
class
HitResult
{
18
public
:
19
[[nodiscard]]
constexpr
explicit
operator
bool()
const
{
20
return
mType == HitResultType::Tile || mType == HitResultType::Entity;
21
}
22
23
HitResult
(
::HitResult
&&) =
default
;
24
25
public
:
26
// member variables
27
// NOLINTBEGIN
28
::Vec3
mStartPos;
29
::Vec3
mRayDir;
30
::HitResultType mType;
31
uchar mFacing;
32
::BlockPos
mBlock;
33
::Vec3
mPos;
34
::WeakEntityRef
mEntity;
35
::AABB
mEntityAABB;
36
bool
mIsHitLiquid;
37
uchar mLiquidFacing;
38
::BlockPos
mLiquid;
39
::Vec3
mLiquidPos;
40
bool
mIndirectHit;
41
// NOLINTEND
42
43
public
:
44
// member functions
45
// NOLINTBEGIN
46
MCAPI
HitResult
();
47
48
MCAPI
HitResult
(
::HitResult
const
&);
49
50
MCAPI
HitResult
(
51
::Vec3
const
& startPos,
52
::Vec3
const
& rayDir,
53
::Actor
& entity,
54
::Vec3
const
& pos,
55
::AABB
const
& entityAABB
56
);
57
58
MCAPI ::Actor* getEntity()
const
;
59
60
MCAPI ::HitResult& operator=(
::HitResult
&&);
61
62
MCAPI ::HitResult& operator=(
::HitResult
const
&);
63
64
MCAPI
~HitResult
();
65
// NOLINTEND
66
67
public
:
68
// constructor thunks
69
// NOLINTBEGIN
70
MCAPI
void
* $ctor();
71
72
MCAPI
void
* $ctor(
::HitResult
&&);
73
74
MCAPI
void
* $ctor(
::HitResult
const
&);
75
76
MCAPI
void
*
77
$ctor(
::Vec3
const
& startPos,
::Vec3
const
& rayDir,
::Actor
& entity,
::Vec3
const
& pos,
::AABB
const
& entityAABB);
78
// NOLINTEND
79
80
public
:
81
// destructor thunk
82
// NOLINTBEGIN
83
MCAPI
void
$dtor();
84
// NOLINTEND
85
};
AABB
Definition
AABB.h:18
Actor
Definition
Actor.h:102
BlockPos
Definition
BlockPos.h:17
HitResult
Definition
HitResult.h:17
Vec3
Definition
Vec3.h:10
WeakEntityRef
Definition
WeakEntityRef.h:14
src-server
mc
world
phys
HitResult.h
Generated on Sun Oct 12 2025 06:32:37 for LeviLamina by
1.12.0