LeviLamina
Loading...
Searching...
No Matches
CompassSpriteCalculator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class Actor;
8class BlockPos;
9class BlockSource;
10// clang-format on
11
12class CompassSpriteCalculator {
13public:
14 // CompassSpriteCalculator inner types define
15 using IsPointingAtTargetFunction = bool (*)(::BlockSource const*, ::Actor*);
16
17 using PointToTargetFunction = ::BlockPos (*)(::BlockSource const*, ::Actor*);
18
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<8, 8, ::BlockPos (*)(::BlockSource const*, ::Actor*)> mTargetToPointTo;
23 ::ll::TypedStorage<8, 8, bool (*)(::BlockSource const*, ::Actor*)> mIsPointingAtTarget;
24 ::ll::TypedStorage<4, 4, int> mFrame;
25 ::ll::TypedStorage<4, 4, float> mRot;
26 ::ll::TypedStorage<4, 4, float> mRotA;
27 ::ll::TypedStorage<4, 4, int> mLastUpdatedAt;
28 // NOLINTEND
29
30#ifdef LL_PLAT_S
31public:
32 // prevent constructor by default
33 CompassSpriteCalculator();
34
35#else // LL_PLAT_C
36public:
37 // prevent constructor by default
38 CompassSpriteCalculator(CompassSpriteCalculator const&);
39 CompassSpriteCalculator();
40
41#endif
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI CompassSpriteCalculator(
46 ::BlockPos (*targetToPointTo)(::BlockSource const*, ::Actor*),
47 bool (*isPointingAtTarget)(::BlockSource const*, ::Actor*),
48 float rot,
49 float rotA
50 );
51
52 MCFOLD int getFrame() const;
53
54#ifdef LL_PLAT_C
55 MCAPI ::CompassSpriteCalculator& operator=(::CompassSpriteCalculator const& other);
56#endif
57
58 MCAPI int update(::Actor& actor, bool instant);
59
60 MCAPI int updateFromPosition(
61 ::BlockSource const* region,
62 ::Actor* actor,
63 float x,
64 float z,
65 float yRot,
66 bool isZFlipped,
67 bool instant
68 );
69
70#ifdef LL_PLAT_C
71 MCAPI int updateFromPosition(
72 ::BlockSource const*,
73 ::BlockPos const& lookTowards,
74 float x,
75 float z,
76 float yRot,
77 bool isZFlipped,
78 bool instant,
79 bool spin
80 );
81#endif
82 // NOLINTEND
83
84public:
85 // static functions
86 // NOLINTBEGIN
87 MCAPI static bool isInLastDeathDimension(::BlockSource const* region, ::Actor* actor);
88
89 MCAPI static bool isInOverworldDimension(::BlockSource const* region, ::Actor*);
90
91 MCAPI static ::BlockPos pointTowardsLastDeathLocation(::BlockSource const* region, ::Actor* actor);
92
93 MCAPI static ::BlockPos pointTowardsSpawnPoint(::BlockSource const* region, ::Actor*);
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99 MCAPI void* $ctor(
100 ::BlockPos (*targetToPointTo)(::BlockSource const*, ::Actor*),
101 bool (*isPointingAtTarget)(::BlockSource const*, ::Actor*),
102 float rot,
103 float rotA
104 );
105 // NOLINTEND
106};
Definition Actor.h:125
Definition BlockPos.h:21
Definition BlockSource.h:73