20class BlockDescriptor {
33 enum class CompareType :
int {
44 ::ll::TypedStorage<8, 8, ::BlockDescriptor&> mBlockDescriptor;
49 ResolveHelper& operator=(ResolveHelper
const&);
50 ResolveHelper(ResolveHelper
const&);
56 MCAPI
void resolve(
bool logInvalidBlocks);
64 ::ll::TypedStorage<8, 8, ::gsl::not_null<::BlockState const*>> mBlockState;
65 ::ll::TypedStorage<4, 4, int> mValue;
73 ::ll::TypedStorage<8, 48, ::HashedString> mName;
74 ::ll::TypedStorage<8, 40, ::SharedTypes::Legacy::BlockDescriptor::Compound> mState;
87 MCAPI State(
::HashedString name, ::std::string
const& stringState);
99 MCAPI
void* $ctor(
::HashedString name, ::std::string
const& stringState);
114 ::ll::TypedStorage<8, 8, ::BlockDescriptor::ResolveHelper> mResolveHelper;
115 ::ll::TypedStorage<8, 48, ::HashedString> mBlockName;
116 ::ll::TypedStorage<1, 1, bool> mIsComplexAlias;
117 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ExpressionNode>> mTags;
118 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor::State>> mRawStates;
119 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor::ResolvedState>> mResolvedStates;
120 ::ll::TypedStorage<4, 4, ::BlockDescriptor::CompareType> mCompareType;
121 ::ll::TypedStorage<1, 1, bool> mContentLogOnError;
122 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
123 ::ll::TypedStorage<1, 1, bool> mValid;
124 ::ll::TypedStorage<1, 1, bool> mIsDeferred;
125 ::ll::TypedStorage<8, 32, ::SpinLockImpl> mLock;
131 MCAPI BlockDescriptor();
135 MCAPI BlockDescriptor(::BlockDescriptor&& rhs);
137 MCAPI BlockDescriptor(::BlockDescriptor
const& rhs);
139 MCAPI BlockDescriptor(::std::string
const& name, ::std::vector<::BlockDescriptor::State>&& states);
141 MCAPI
bool _anyTagsMatch(
::Block const& block)
const;
143 MCAPI
void _resolve(
bool logInvalidBlocks)
const;
145 MCAPI
bool _statesMatch(
::Block const& block)
const;
147 MCAPI ::Block
const& getBlockOrUnknownBlock()
const;
149 MCAPI ::BlockDescriptor::CompareType
const& getCompareType()
const;
151 MCAPI
bool matches(
::Block const& block)
const;
153 MCAPI
bool matches(::BlockDescriptor
const& otherDescriptor)
const;
155 MCAPI
void operator=(::BlockDescriptor&& rhs);
157 MCAPI
void operator=(::BlockDescriptor
const& rhs);
159 MCAPI ::std::unique_ptr<::CompoundTag> toCompoundTag()
const;
161 MCAPI ~BlockDescriptor();
167 MCAPI
static bool anyMatch(::std::vector<::BlockDescriptor>
const& blockDescriptors,
::Block const& block);
171 MCAPI static ::BlockDescriptor fromCompoundTag(
::CompoundTag const& tag);
173 MCAPI static ::BlockDescriptor fromTagExpression(::std::string
const& tagExpression, ::MolangVersion molangVersion);
179 MCAPI static ::std::add_lvalue_reference_t<char const[]> JSON_NAME_FIELD();
181 MCAPI static ::std::add_lvalue_reference_t<char const[]> JSON_STATES_FIELD();
183 MCAPI static ::std::add_lvalue_reference_t<char const[]> JSON_TAGS_FIELD();
193 MCAPI
void* $ctor(::BlockDescriptor&& rhs);
195 MCAPI
void* $ctor(::BlockDescriptor
const& rhs);
197 MCAPI
void* $ctor(::std::string
const& name, ::std::vector<::BlockDescriptor::State>&& states);