LeviLamina
Loading...
Searching...
No Matches
GameRule.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/cereal/schema/dynamic/NullType.h"
7
8// auto generated forward declare list
9// clang-format off
10class BaseGameVersion;
11class CompoundTag;
12// clang-format on
13
14class GameRule {
15public:
16 // GameRule inner types declare
17 // clang-format off
18 class ValidationError;
19 // clang-format on
20
21 // GameRule inner types define
22 enum class Type : uchar {
23 Invalid = 0,
24 Bool = 1,
25 Int = 2,
26 Float = 3,
27 };
28
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<1, 1, bool> mSuccess;
34 ::ll::TypedStorage<8, 32, ::std::string> mErrorDescription;
35 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mErrorParameters;
36 // NOLINTEND
37 };
38
39 using CommandValueRedirectCallback = ::std::function<::std::variant<::cereal::NullType, bool, int, float>(
40 ::std::variant<::cereal::NullType, bool, int, float> const&
41 )>;
42
43 using TagDataNotFoundCallback = ::std::function<void(::GameRule&, ::BaseGameVersion const&, ::CompoundTag const&)>;
44
45 using ValidateValueCallback = ::std::function<
46 bool(::std::variant<::cereal::NullType, bool, int, float> const&, ::GameRule::ValidationError*)>;
47
48 using Value = ::std::variant<::cereal::NullType, bool, int, float>;
49
50public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<1, 1, bool> mShouldSave;
54 ::ll::TypedStorage<1, 1, ::GameRule::Type> mType;
55 ::ll::TypedStorage<4, 8, ::std::variant<::cereal::NullType, bool, int, float>> mValue;
56 ::ll::TypedStorage<8, 32, ::std::string> mName;
57 ::ll::TypedStorage<1, 1, bool> mAllowUseInCommand;
58 ::ll::TypedStorage<1, 1, bool> mAllowUseInScripting;
59 ::ll::TypedStorage<1, 1, bool> mIsDefaultSet;
60 ::ll::TypedStorage<1, 1, bool> mRequiresCheats;
61 ::ll::TypedStorage<1, 1, bool> mCanBeModifiedByPlayer;
62 ::ll::TypedStorage<8, 64, ::std::function<void(::GameRule&, ::BaseGameVersion const&, ::CompoundTag const&)>>
63 mTagNotFoundCallback;
64 ::ll::TypedStorage<
65 8,
66 64,
67 ::std::function<
68 bool(::std::variant<::cereal::NullType, bool, int, float> const&, ::GameRule::ValidationError*)>>
69 mValidateValueCallback;
70 ::ll::TypedStorage<8, 16, ::std::map<::std::string, int>> mCommandEnumNames;
71 ::ll::TypedStorage<4, 4, int> mMinCommandVersion;
72 ::ll::TypedStorage<4, 4, int> mMaxCommandVersion;
73 ::ll::TypedStorage<
74 8,
75 64,
76 ::std::function<::std::variant<::cereal::NullType, bool, int, float>(
77 ::std::variant<::cereal::NullType, bool, int, float> const&
78 )>>
79 mCommandValueRedirectConverter;
80 ::ll::TypedStorage<4, 8, ::std::optional<int>> mCommandValueRedirectTarget;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI GameRule();
87
88 MCAPI GameRule(::GameRule&&);
89
90 MCAPI GameRule(::GameRule const&);
91
92 MCAPI GameRule(::std::string const& name, bool canBeModifiedByPlayer);
93
94 MCAPI GameRule(
95 ::std::string const& name,
96 bool value,
97 bool shouldSave,
98 bool allowInCommand,
99 bool requiresCheats,
100 bool canBeModifiedByPlayer
101 );
102
103 MCAPI bool _set(
104 ::std::variant<::cereal::NullType, bool, int, float> const& v,
105 bool* pValidated,
106 ::GameRule::ValidationError* errorOutput
107 );
108
109#ifdef LL_PLAT_C
110 MCAPI bool compareValue(::std::variant<::cereal::NullType, bool, int, float> const& v) const;
111
112 MCAPI bool getBool() const;
113
114 MCAPI int getInt() const;
115#endif
116
117 MCAPI ::GameRule& operator=(::GameRule&&);
118
119 MCAPI ::GameRule& operator=(::GameRule const&);
120
121 MCAPI bool operator==(::GameRule const& other) const;
122
123 MCAPI ~GameRule();
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCAPI void* $ctor();
130
131 MCAPI void* $ctor(::GameRule&&);
132
133 MCAPI void* $ctor(::GameRule const&);
134
135 MCAPI void* $ctor(::std::string const& name, bool canBeModifiedByPlayer);
136
137 MCAPI void* $ctor(
138 ::std::string const& name,
139 bool value,
140 bool shouldSave,
141 bool allowInCommand,
142 bool requiresCheats,
143 bool canBeModifiedByPlayer
144 );
145 // NOLINTEND
146
147public:
148 // destructor thunk
149 // NOLINTBEGIN
150 MCAPI void $dtor();
151 // NOLINTEND
152};
Definition BaseGameVersion.h:8
Definition CompoundTag.h:18
Definition GameRule.h:29