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 CompoundTag;
15class ExpressionNode;
16namespace SharedTypes::Legacy { struct BlockDescriptor; }
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(State const&);
46 State();
47
48 public:
49 // member functions
50 // NOLINTBEGIN
52
53 MCNAPI State(::HashedString name, ::std::string const& stringState);
54
55 MCNAPI ::BlockDescriptor::State& operator=(::BlockDescriptor::State const&);
56
57 MCNAPI ~State();
58 // NOLINTEND
59
60 public:
61 // constructor thunks
62 // NOLINTBEGIN
64
65 MCNAPI void* $ctor(::HashedString name, ::std::string const& stringState);
66 // NOLINTEND
67
68 public:
69 // destructor thunk
70 // NOLINTBEGIN
71 MCNAPI void $dtor();
72 // NOLINTEND
73 };
74
76 public:
77 // member variables
78 // NOLINTBEGIN
81 // NOLINTEND
82
83 public:
84 // prevent constructor by default
85 ResolvedState& operator=(ResolvedState const&);
88 };
89
90 enum class CompareType : int {
91 AnyTag = 0,
92 BlockName = 1,
93 States = 2,
94 Unknown = 3,
95 };
96
98 public:
99 // member variables
100 // NOLINTBEGIN
101 ::ll::TypedStorage<8, 8, ::BlockDescriptor&> mBlockDescriptor;
102 // NOLINTEND
103
104 public:
105 // prevent constructor by default
106 ResolveHelper& operator=(ResolveHelper const&);
109
110 public:
111 // member functions
112 // NOLINTBEGIN
113 MCNAPI void resolve(bool logInvalidBlocks);
114 // NOLINTEND
115 };
116
117public:
118 // member variables
119 // NOLINTBEGIN
120 ::ll::TypedStorage<8, 8, ::BlockDescriptor::ResolveHelper> mResolveHelper;
121 ::ll::TypedStorage<8, 48, ::HashedString> mBlockName;
122 ::ll::TypedStorage<1, 1, bool> mIsComplexAlias;
123 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ExpressionNode>> mTags;
124 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor::State>> mRawStates;
125 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor::ResolvedState>> mResolvedStates;
126 ::ll::TypedStorage<4, 4, ::BlockDescriptor::CompareType> mCompareType;
127 ::ll::TypedStorage<1, 1, bool> mContentLogOnError;
128 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
129 ::ll::TypedStorage<1, 1, bool> mValid;
130 ::ll::TypedStorage<1, 1, bool> mIsDeferred;
131 ::ll::TypedStorage<8, 32, ::SpinLockImpl> mLock;
132 // NOLINTEND
133
134public:
135 // member functions
136 // NOLINTBEGIN
138
140
141 MCNAPI explicit BlockDescriptor(::HashedString const& fullName);
142
144
146
147 MCNAPI BlockDescriptor(::std::string const& name, ::std::vector<::BlockDescriptor::State>&& states);
148
149 MCNAPI bool _anyTagsMatch(::Block const& block) const;
150
151 MCNAPI void _resolve(bool logInvalidBlocks) const;
152
153 MCNAPI bool _statesMatch(::Block const& block) const;
154
155 MCNAPI ::Block const& getBlockOrUnknownBlock() const;
156
157 MCNAPI ::BlockDescriptor::CompareType const& getCompareType() const;
158
159 MCNAPI bool matches(::Block const& block) const;
160
161 MCNAPI bool matches(::BlockDescriptor const& otherDescriptor) const;
162
163 MCNAPI void operator=(::BlockDescriptor&& rhs);
164
165 MCNAPI void operator=(::BlockDescriptor const& rhs);
166
167 MCNAPI ::std::unique_ptr<::CompoundTag> toCompoundTag() const;
168
169 MCNAPI ::Block const* tryGetBlock() const;
170
172 // NOLINTEND
173
174public:
175 // static functions
176 // NOLINTBEGIN
177 MCNAPI static bool anyMatch(::std::vector<::BlockDescriptor> const& blockDescriptors, ::Block const& block);
178
180
181 MCNAPI static ::BlockDescriptor fromCompoundTag(::CompoundTag const& tag);
182
183 MCNAPI static ::BlockDescriptor
184 fromTagExpression(::std::string const& tagExpression, ::MolangVersion molangVersion);
185 // NOLINTEND
186
187public:
188 // static variables
189 // NOLINTBEGIN
190 MCNAPI static ::std::add_lvalue_reference_t<char const[]> JSON_NAME_FIELD();
191
192 MCNAPI static ::std::add_lvalue_reference_t<char const[]> JSON_STATES_FIELD();
193
194 MCNAPI static ::std::add_lvalue_reference_t<char const[]> JSON_TAGS_FIELD();
195 // NOLINTEND
196
197public:
198 // constructor thunks
199 // NOLINTBEGIN
200 MCNAPI void* $ctor();
201
203
204 MCNAPI void* $ctor(::HashedString const& fullName);
205
206 MCNAPI void* $ctor(::BlockDescriptor&& rhs);
207
208 MCNAPI void* $ctor(::BlockDescriptor const& rhs);
209
210 MCNAPI void* $ctor(::std::string const& name, ::std::vector<::BlockDescriptor::State>&& states);
211 // NOLINTEND
212
213public:
214 // destructor thunk
215 // NOLINTBEGIN
216 MCNAPI void $dtor();
217 // NOLINTEND
218};
Definition BlockDescriptor.h:97
MCAPI void resolve(bool logInvalidBlocks)
Definition BlockDescriptor.h:75
Definition BlockDescriptor.h:20
static MCAPI bool anyMatch(::std::vector<::BlockDescriptor > const &blockDescriptors, ::Block const &block)
MCAPI void operator=(::BlockDescriptor &&rhs)
MCAPI bool _statesMatch(::Block const &block) const
MCAPI bool matches(::Block const &block) const
MCAPI BlockDescriptor()
static MCAPI ::BlockDescriptor fromCompoundTag(::CompoundTag const &tag)
MCAPI void * $ctor(::std::string const &name, ::std::vector<::BlockDescriptor::State > &&states)
MCAPI bool matches(::BlockDescriptor const &otherDescriptor) const
MCAPI void $dtor()
MCAPI void * $ctor(::SharedTypes::Legacy::BlockDescriptor desc)
MCAPI void * $ctor(::HashedString const &fullName)
MCAPI void * $ctor(::BlockDescriptor &&rhs)
static MCAPI ::std::add_lvalue_reference_t< char const[]> JSON_STATES_FIELD()
static MCAPI ::BlockDescriptor fromTagExpression(::std::string const &tagExpression, ::MolangVersion molangVersion)
MCAPI ::std::unique_ptr<::CompoundTag > toCompoundTag() const
MCAPI ~BlockDescriptor()
MCAPI::Block const & getBlockOrUnknownBlock() const
MCAPI BlockDescriptor(::BlockDescriptor const &rhs)
MCAPI void operator=(::BlockDescriptor const &rhs)
MCAPI::BlockDescriptor::CompareType const & getCompareType() const
MCAPI void * $ctor(::BlockDescriptor const &rhs)
MCAPI BlockDescriptor(::SharedTypes::Legacy::BlockDescriptor desc)
MCAPI BlockDescriptor(::std::string const &name, ::std::vector<::BlockDescriptor::State > &&states)
MCAPI bool _anyTagsMatch(::Block const &block) const
MCAPI BlockDescriptor(::BlockDescriptor &&rhs)
static MCAPI ::std::add_lvalue_reference_t< char const[]> JSON_TAGS_FIELD()
static MCAPI void bindType(::cereal::ReflectionCtx &ctx)
MCAPI BlockDescriptor(::HashedString const &fullName)
MCAPI::Block const * tryGetBlock() const
MCAPI void * $ctor()
MCAPI void _resolve(bool logInvalidBlocks) const
static MCAPI ::std::add_lvalue_reference_t< char const[]> JSON_NAME_FIELD()
Definition Block.h:38
Definition CompoundTag.h:13
Definition ExpressionNode.h:27
Definition HashedString.h:5
Definition BlockDescriptor.h:35
MCAPI::BlockDescriptor::State & operator=(::BlockDescriptor::State const &)
MCAPI void * $ctor(::HashedString name, ::std::string const &stringState)
MCAPI State(::HashedString name, ::std::string const &stringState)
MCAPI void * $ctor(::HashedString name, ::SharedTypes::Legacy::BlockDescriptor::Compound state)
MCAPI State(::HashedString name, ::SharedTypes::Legacy::BlockDescriptor::Compound state)
Definition BlockDescriptor.h:15
Definition BlockDescriptor.h:7
Definition ReflectionCtx.h:11
Definition ctx.h:5
Definition Alias.h:14