LeviLamina
Loading...
Searching...
No Matches
BlockDescriptor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/BlockDescriptor.h"
7#include "mc/molang/MolangVersion.h"
8
9// auto generated forward declare list
10// clang-format off
11class Block;
12class CompoundTag;
13class ExpressionNode;
14class HashedString;
15class SpinLockImpl;
16namespace SharedTypes::Legacy { struct BlockDescriptor; }
17// clang-format on
18
20public:
21 char filler[0xB8];
22
23public:
24 // BlockDescriptor inner types declare
25 // clang-format off
26 class ResolveHelper;
27 class ResolvedState;
28 struct State;
29 // clang-format on
30
31 // BlockDescriptor inner types define
33
34 struct State {
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 48, ::HashedString> mName;
39 ::ll::TypedStorage<8, 40, ::SharedTypes::Legacy::BlockDescriptor::Compound> mState;
40 // NOLINTEND
41
42 public:
43 // prevent constructor by default
44 State(State const&);
45
46 public:
47 // member functions
48 // NOLINTBEGIN
49 MCAPI State(::HashedString name, ::std::string const& stringState);
50
51 MCAPI ::BlockDescriptor::State& operator=(::BlockDescriptor::State const&);
52
53 MCAPI ~State();
54 // NOLINTEND
55
56 public:
57 // constructor thunks
58 // NOLINTBEGIN
59 MCAPI void* $ctor(::HashedString name, ::std::string const& stringState);
60 // NOLINTEND
61
62 public:
63 // destructor thunk
64 // NOLINTBEGIN
65 MCFOLD void $dtor();
66 // NOLINTEND
67 };
68
70 public:
71 // member variables
72 // NOLINTBEGIN
75 // NOLINTEND
76
77 public:
78 // prevent constructor by default
79 ResolvedState& operator=(ResolvedState const&);
82 };
83
84 enum class CompareType : int {
85 AnyTag = 0,
86 BlockName = 1,
87 States = 2,
88 Unknown = 3,
89 };
90
92 public:
93 // member variables
94 // NOLINTBEGIN
95 ::ll::TypedStorage<8, 8, ::BlockDescriptor&> mBlockDescriptor;
96 // NOLINTEND
97
98 public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI void resolve(bool logInvalidBlocks);
102 // NOLINTEND
103 };
104
105public:
106 // member variables
107 // NOLINTBEGIN
108 ::ll::TypedStorage<8, 8, ::BlockDescriptor::ResolveHelper> mResolveHelper;
109 ::ll::TypedStorage<8, 48, ::HashedString> mBlockName;
110 ::ll::TypedStorage<1, 1, bool> mIsComplexAlias;
111 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ExpressionNode>> mTags;
112 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor::State>> mRawStates;
113 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor::ResolvedState>> mResolvedStates;
114 ::ll::TypedStorage<4, 4, ::BlockDescriptor::CompareType> mCompareType;
115 ::ll::TypedStorage<1, 1, bool> mContentLogOnError;
116 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
117 ::ll::TypedStorage<1, 1, bool> mValid;
118 ::ll::TypedStorage<1, 1, bool> mIsDeferred;
119 ::ll::TypedStorage<8, 32, ::SpinLockImpl> mLock;
120 // NOLINTEND
121
122public:
123 // member functions
124 // NOLINTBEGIN
125 MCAPI BlockDescriptor();
126
128
129 MCAPI explicit BlockDescriptor(::HashedString const& fullName);
130
132
133 MCAPI BlockDescriptor(::BlockDescriptor const& rhs);
134
135 MCAPI BlockDescriptor(::std::string const& name, ::std::vector<::BlockDescriptor::State>&& states);
136
137 MCAPI bool _anyTagsMatch(::Block const& block) const;
138
139 MCAPI void _resolve(bool logInvalidBlocks) const;
140
141 MCAPI bool _statesMatch(::Block const& block) const;
142
143 MCAPI ::Block const& getBlockOrUnknownBlock() const;
144
145 MCAPI ::BlockDescriptor::CompareType const& getCompareType() const;
146
147 MCAPI bool matches(::Block const& block) const;
148
149 MCAPI bool matches(::BlockDescriptor const& otherDescriptor) const;
150
151 MCAPI void operator=(::BlockDescriptor&& rhs);
152
153 MCAPI void operator=(::BlockDescriptor const& rhs);
154
155 MCAPI ::std::unique_ptr<::CompoundTag> toCompoundTag() const;
156
157 MCAPI ::Block const* tryGetBlock() const;
158
159 MCAPI ~BlockDescriptor();
160 // NOLINTEND
161
162public:
163 // static functions
164 // NOLINTBEGIN
165 MCAPI static bool anyMatch(::std::vector<::BlockDescriptor> const& blockDescriptors, ::Block const& block);
166
167 MCAPI static bool
168 anyMatch(::std::vector<::BlockDescriptor> const& blockDescriptors, ::BlockDescriptor const& otherBlockDescriptor);
169
170 MCAPI static ::BlockDescriptor fromCompoundTag(::CompoundTag const& tag);
171
172 MCAPI static ::BlockDescriptor fromTagExpression(::std::string const& tagExpression, ::MolangVersion molangVersion);
173 // NOLINTEND
174
175public:
176 // static variables
177 // NOLINTBEGIN
178 MCAPI static ::std::add_lvalue_reference_t<char const[]> JSON_NAME_FIELD();
179
180 MCAPI static ::std::add_lvalue_reference_t<char const[]> JSON_STATES_FIELD();
181
182 MCAPI static ::std::add_lvalue_reference_t<char const[]> JSON_TAGS_FIELD();
183 // NOLINTEND
184
185public:
186 // constructor thunks
187 // NOLINTBEGIN
188 MCAPI void* $ctor();
189
190 MCAPI void* $ctor(::SharedTypes::Legacy::BlockDescriptor desc);
191
192 MCAPI void* $ctor(::HashedString const& fullName);
193
194 MCAPI void* $ctor(::BlockDescriptor&& rhs);
195
196 MCAPI void* $ctor(::BlockDescriptor const& rhs);
197
198 MCAPI void* $ctor(::std::string const& name, ::std::vector<::BlockDescriptor::State>&& states);
199 // NOLINTEND
200
201public:
202 // destructor thunk
203 // NOLINTBEGIN
204 MCAPI void $dtor();
205 // NOLINTEND
206};
Definition BlockDescriptor.h:91
Definition BlockDescriptor.h:69
Definition BlockDescriptor.h:19
Definition Block.h:36
Definition CompoundTag.h:13
Definition ExpressionNode.h:31
Definition HashedString.h:5
Definition SpinLockImpl.h:5
Definition BlockDescriptor.h:34
Definition BlockDescriptor.h:15
Definition BlockDescriptor.h:7
Definition Alias.h:14