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