LeviLamina
Loading...
Searching...
No Matches
BlockStateCommandParam.h
1#pragma once
2
3#include "ll/api/Expected.h"
4#include "mc/_HeaderOutputPredefine.h"
5#include "mc/world/level/block/Block.h"
6
7// auto generated forward declare list
8// clang-format off
9class Block;
10class BlockState;
11class CommandOutput;
12class CompoundTag;
13class HashedString;
14// clang-format on
15
17public:
18 // BlockStateCommandParam inner types define
19 enum class Type : int {
20 Integer = 0,
21 Float = 1,
22 Bool = 2,
23 String = 3,
24 Invalid = 4,
25 };
26
27public:
28 LLNDAPI ll::Expected<Block::BlockStateValueType> toStateValue() const;
29
30 LLNDAPI static ll::Expected<Block::BlockStatesType> toStateMap(std::vector<BlockStateCommandParam> const&);
31
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::std::string mBlockState;
36 ::std::string mValue;
37 ::BlockStateCommandParam::Type mType;
38 // NOLINTEND
39
40public:
41 // member functions
42 // NOLINTBEGIN
43 MCAPI bool _createCompoundTag(::CompoundTag& tag, ::CommandOutput& output) const;
44
45 MCAPI ::BlockState const* _getBlockState(::Block const& block) const;
46
47 MCAPI ::std::optional<::std::pair<::HashedString, int>>
48 getNameAndValue(::CommandOutput& output, ::Block const& defaultNewBlock) const;
49
50 MCAPI bool setBlockState(::Block const** inputBlock, ::CommandOutput& output) const;
51
53 // NOLINTEND
54
55public:
56 // destructor thunk
57 // NOLINTBEGIN
58 MCFOLD void $dtor();
59 // NOLINTEND
60};
Definition BlockStateCommandParam.h:16
Definition BlockState.h:11
Definition Block.h:36
Definition CommandOutput.h:19
Definition CompoundTag.h:13
Definition HashedString.h:5