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
14class Actor;
15// clang-format on
16
17class HitResult {
18public:
19 [[nodiscard]] constexpr explicit operator bool() const {
20 return mType == HitResultType::Tile || mType == HitResultType::Entity;
21 }
22
23 HitResult(::HitResult&&) = default;
24
25public:
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
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI HitResult();
47
48 MCAPI HitResult(::HitResult const&);
49
50#ifdef LL_PLAT_C
51 MCAPI HitResult(::Vec3 const& startPos, ::Vec3 const& rayDir, ::Actor& entity, ::Vec3 const& pos);
52#endif
53
54 MCAPI HitResult(
55 ::Vec3 const& startPos,
56 ::Vec3 const& rayDir,
57 ::Actor& entity,
58 ::Vec3 const& pos,
59 ::AABB const& entityAABB
60 );
61
62 MCAPI ::Actor* getEntity() const;
63
64 MCAPI ::HitResult& operator=(::HitResult&&);
65
66 MCAPI ::HitResult& operator=(::HitResult const&);
67
68#ifdef LL_PLAT_C
69 MCAPI void resetHitEntity();
70#endif
71
72 MCAPI ~HitResult();
73 // NOLINTEND
74
75public:
76 // constructor thunks
77 // NOLINTBEGIN
78 MCAPI void* $ctor();
79
80 MCAPI void* $ctor(::HitResult&&);
81
82 MCAPI void* $ctor(::HitResult const&);
83
84#ifdef LL_PLAT_C
85 MCAPI void* $ctor(::Vec3 const& startPos, ::Vec3 const& rayDir, ::Actor& entity, ::Vec3 const& pos);
86#endif
87
88 MCAPI void*
89 $ctor(::Vec3 const& startPos, ::Vec3 const& rayDir, ::Actor& entity, ::Vec3 const& pos, ::AABB const& entityAABB);
90 // NOLINTEND
91
92public:
93 // destructor thunk
94 // NOLINTBEGIN
95 MCFOLD void $dtor();
96 // NOLINTEND
97};
Definition AABB.h:18
Definition Actor.h:106
Definition BlockPos.h:19
Definition Vec3.h:10
Definition WeakEntityRef.h:14