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
16class BlockStateCommandParam {
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 // prevent constructor by default
42 BlockStateCommandParam& operator=(BlockStateCommandParam const&);
43 BlockStateCommandParam();
44
45public:
46 // member functions
47 // NOLINTBEGIN
48 MCAPI BlockStateCommandParam(::BlockStateCommandParam const&);
49
50 MCAPI BlockStateCommandParam(::std::string state, ::std::string value, ::BlockStateCommandParam::Type type);
51
52 MCAPI bool _createCompoundTag(::CompoundTag& tag, ::CommandOutput& output) const;
53
54 MCAPI ::BlockState const* _getBlockState(::Block const& block) const;
55
56 MCAPI ::std::optional<::std::pair<::HashedString, int>>
57 getNameAndValue(::CommandOutput& output, ::Block const& defaultNewBlock) const;
58
59 MCAPI bool setBlockState(::Block const** inputBlock, ::CommandOutput& output) const;
60
61 MCAPI ~BlockStateCommandParam();
62 // NOLINTEND
63
64public:
65 // constructor thunks
66 // NOLINTBEGIN
67 MCFOLD void* $ctor(::BlockStateCommandParam const&);
68
69 MCAPI void* $ctor(::std::string state, ::std::string value, ::BlockStateCommandParam::Type type);
70 // NOLINTEND
71
72public:
73 // destructor thunk
74 // NOLINTBEGIN
75 MCFOLD void $dtor();
76 // NOLINTEND
77};
Definition BlockState.h:14
Definition Block.h:69
Definition CommandOutput.h:20
Definition CompoundTag.h:23
Definition HashedString.h:5