LeviLamina
Loading...
Searching...
No Matches
ServerWaypoint.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Color.h"
7#include "mc/deps/core/math/Vec2.h"
8#include "mc/legacy/ActorUniqueID.h"
9#include "mc/world/Waypoint.h"
10#include "mc/world/level/WorldPosition.h"
11
12// auto generated forward declare list
13// clang-format off
14class Player;
15class Vec3;
16// clang-format on
17
18class ServerWaypoint : public ::Waypoint {
19public:
20 // ServerWaypoint inner types declare
21 // clang-format off
22 struct Payload;
23 struct Texture;
24 struct TextureSelector;
25 // clang-format on
26
27 // ServerWaypoint inner types define
28 enum class UpdateFlags : uint {
29 // bitfield representation
30 Position = 1u << 0,
31 Visibility = 1u << 1,
32 TexturePath = 1u << 2,
33 IconSize = 1u << 3,
34 Color = 1u << 4,
35 ClientPositionAuthority = 1u << 5,
36 All = Position | Visibility | TexturePath | IconSize | Color | ClientPositionAuthority,
37 };
38
39 struct Payload {
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<4, 4, uint> mUpdateFlag;
44 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mIsVisible;
45 ::ll::TypedStorage<4, 20, ::std::optional<::WorldPosition>> mWorldPosition;
46 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mTexturePath;
47 ::ll::TypedStorage<4, 12, ::std::optional<::Vec2>> mIconSize;
48 ::ll::TypedStorage<4, 20, ::std::optional<::mce::Color>> mColor;
49 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mClientPositionAuthority;
50 ::ll::TypedStorage<8, 16, ::std::optional<::ActorUniqueID>> mActorID;
51 // NOLINTEND
52
53 public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI bool operator==(::ServerWaypoint::Payload const&) const;
57
58 MCAPI ~Payload();
59 // NOLINTEND
60
61 public:
62 // destructor thunk
63 // NOLINTBEGIN
64 MCFOLD void $dtor();
65 // NOLINTEND
66 };
67
68 struct Texture {
69 public:
70 // member variables
71 // NOLINTBEGIN
72 ::ll::TypedStorage<4, 4, int> mLowerBound;
73 ::ll::TypedStorage<4, 8, ::std::optional<int>> mUpperBound;
74 ::ll::TypedStorage<8, 32, ::std::string> mTexturePath;
75 ::ll::TypedStorage<4, 8, ::Vec2> mIconSize;
76 // NOLINTEND
77
78 public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI ~Texture();
82 // NOLINTEND
83
84 public:
85 // destructor thunk
86 // NOLINTBEGIN
87 MCFOLD void $dtor();
88 // NOLINTEND
89 };
90
92 public:
93 // member variables
94 // NOLINTBEGIN
95 ::ll::TypedStorage<8, 24, ::std::vector<::ServerWaypoint::Texture>> mTextures;
96 // NOLINTEND
97
98 public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI ::std::optional<::ServerWaypoint::Texture>
102 tryGetTexture(::Vec3 const& viewingPos, ::Vec3 const& observedPos) const;
103 // NOLINTEND
104 };
105
106public:
107 // member variables
108 // NOLINTBEGIN
109 ::ll::TypedStorage<1, 1, bool> mIsEnabled;
110 ::ll::TypedStorage<8, 24, ::ServerWaypoint::TextureSelector> mTextureSelector;
111 ::ll::TypedStorage<4, 4, uint> mUpdateFlags;
112 // NOLINTEND
113
114public:
115 // prevent constructor by default
116 ServerWaypoint();
117
118public:
119 // virtual functions
120 // NOLINTBEGIN
121 virtual void setWorldPosition(::WorldPosition const& worldPosition) /*override*/;
122
123 virtual void setColor(::std::optional<::mce::Color> const& color) /*override*/;
124
125 virtual void setIsVisible(bool isVisible) /*override*/;
126
127 virtual void setClientPositionAuthority(bool clientPositionAuthority) /*override*/;
128
129 virtual void setTexturePath(::std::optional<::std::string> const& texturePath) /*override*/;
130
131 virtual void setIconSize(::Vec2 const& iconSize) /*override*/;
132
133 virtual bool isValid() const;
134
135 virtual bool calculateIsVisible(::Player const& viewingPlayer) const;
136
137 virtual void update(::Player const& viewingPlayer) /*override*/;
138 // NOLINTEND
139
140public:
141 // member functions
142 // NOLINTBEGIN
143 MCAPI ServerWaypoint(
144 ::ServerWaypoint::TextureSelector const& textureSelector,
145 ::std::optional<::mce::Color> const& color,
146 ::WorldPosition worldPosition
147 );
148
149 MCAPI ::ServerWaypoint::Payload generatePayload(uint updateFlag);
150
151 MCFOLD void setIsEnabled(bool isEnabled);
152
153 MCAPI void setTextureSelector(::ServerWaypoint::TextureSelector const& textureSelector);
154 // NOLINTEND
155
156public:
157 // constructor thunks
158 // NOLINTBEGIN
159 MCAPI void* $ctor(
160 ::ServerWaypoint::TextureSelector const& textureSelector,
161 ::std::optional<::mce::Color> const& color,
162 ::WorldPosition worldPosition
163 );
164 // NOLINTEND
165
166public:
167 // virtual function thunks
168 // NOLINTBEGIN
169 MCAPI void $setWorldPosition(::WorldPosition const& worldPosition);
170
171 MCAPI void $setColor(::std::optional<::mce::Color> const& color);
172
173 MCAPI void $setIsVisible(bool isVisible);
174
175 MCAPI void $setClientPositionAuthority(bool clientPositionAuthority);
176
177 MCAPI void $setTexturePath(::std::optional<::std::string> const& texturePath);
178
179 MCAPI void $setIconSize(::Vec2 const& iconSize);
180
181 MCFOLD bool $isValid() const;
182
183 MCAPI bool $calculateIsVisible(::Player const& viewingPlayer) const;
184
185 MCAPI void $update(::Player const& viewingPlayer);
186
187
188 // NOLINTEND
189
190public:
191 // vftables
192 // NOLINTBEGIN
193 MCNAPI static void** $vftable();
194 // NOLINTEND
195};
Definition Player.h:137
static MCAPI void ** $vftable()
Definition Vec2.h:5
Definition Vec3.h:10
Definition Waypoint.h:16
Definition ServerWaypoint.h:39
Definition ServerWaypoint.h:91
Definition ServerWaypoint.h:68
Definition WorldPosition.h:5