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