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