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