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 // prevent constructor by default
80 GameRule();
81
82public:
83 // member functions
84 // NOLINTBEGIN
85 MCAPI GameRule(::GameRule&&);
86
87 MCAPI GameRule(::GameRule const&);
88
89 MCAPI GameRule(::std::string const& name, bool canBeModifiedByPlayer);
90
91 MCAPI bool _set(
92 ::std::variant<::cereal::NullType, bool, int, float> const& v,
93 bool* pValidated,
95 );
96
97 MCAPI ::GameRule& _setDefaultValue(bool b);
98
99 MCAPI ::GameRule& _setDefaultValue(int i);
100
101 MCAPI_C bool getBool() const;
102
103 MCAPI_C int getInt() const;
104
105 MCAPI ::std::string getLowercaseName() const;
106
107 MCAPI ::GameRule& operator=(::GameRule&&);
108
109 MCAPI ::GameRule& operator=(::GameRule const&);
110
111 MCAPI bool operator==(::GameRule const& other) const;
112
113 MCAPI void resetType(::GameRule::Type type);
114
115 MCAPI ::GameRule& setTagDataNotFoundCallback(::std::function<void(::GameRule&, ::BaseGameVersion const&)> cb);
116
117 MCAPI ::GameRule& setValidateValueCallback(
118 ::std::function<bool(::std::variant<::cereal::NullType, bool, int, float> const&, ::GameRule::ValidationError*)>
119 cb
120 );
121
122 MCAPI ~GameRule();
123 // NOLINTEND
124
125public:
126 // constructor thunks
127 // NOLINTBEGIN
128 MCAPI void* $ctor(::GameRule&&);
129
130 MCAPI void* $ctor(::GameRule const&);
131
132 MCAPI void* $ctor(::std::string const& name, bool canBeModifiedByPlayer);
133 // NOLINTEND
134
135public:
136 // destructor thunk
137 // NOLINTBEGIN
138 MCAPI void $dtor();
139 // NOLINTEND
140};
Definition BaseGameVersion.h:8
Definition GameRule.h:28