LeviLamina
Loading...
Searching...
No Matches
GameRule.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
8// clang-format on
9
10class GameRule {
11public:
12 // GameRule inner types declare
13 // clang-format off
14 class ValidationError;
15 // clang-format on
16
17 // GameRule inner types define
18 enum class Type : uchar {
19 Invalid = 0,
20 Bool = 1,
21 Int = 2,
22 Float = 3,
23 };
24
25 union Value {
26 public:
27 // member variables
28 // NOLINTBEGIN
32 // NOLINTEND
33 };
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<1, 1, bool> mSuccess;
39 ::ll::TypedStorage<8, 32, ::std::string> mErrorDescription;
40 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mErrorParameters;
41 // NOLINTEND
42
43 public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI ~ValidationError();
47 // NOLINTEND
48
49 public:
50 // destructor thunk
51 // NOLINTBEGIN
52 MCFOLD void $dtor();
53 // NOLINTEND
54 };
55
56 using TagDataNotFoundCallback = ::std::function<void(::GameRule&, ::BaseGameVersion const&)>;
57
58 using ValidateValueCallback = ::std::function<bool(::GameRule::Value const&, ::GameRule::ValidationError*)>;
59
60public:
61 // member variables
62 // NOLINTBEGIN
63 ::ll::TypedStorage<1, 1, bool> mShouldSave;
64 ::ll::TypedStorage<1, 1, ::GameRule::Type> mType;
65 ::ll::TypedStorage<4, 4, ::GameRule::Value> mValue;
66 ::ll::TypedStorage<8, 32, ::std::string> mName;
67 ::ll::TypedStorage<1, 1, bool> mAllowUseInCommand;
68 ::ll::TypedStorage<1, 1, bool> mAllowUseInScripting;
69 ::ll::TypedStorage<1, 1, bool> mIsDefaultSet;
70 ::ll::TypedStorage<1, 1, bool> mRequiresCheats;
71 ::ll::TypedStorage<1, 1, bool> mCanBeModifiedByPlayer;
72 ::ll::TypedStorage<8, 64, ::std::function<void(::GameRule&, ::BaseGameVersion const&)>> mTagNotFoundCallback;
73 ::ll::TypedStorage<8, 64, ::std::function<bool(::GameRule::Value const&, ::GameRule::ValidationError*)>>
74 mValidateValueCallback;
75 // NOLINTEND
76
77public:
78 // member functions
79 // NOLINTBEGIN
80 MCAPI GameRule(::GameRule const&);
81
82 MCAPI GameRule(::GameRule&&);
83
84 MCAPI GameRule(::std::string const& name, bool canBeModifiedByPlayer);
85
86 MCAPI ::GameRule& _setDefaultValue(bool b);
87
88 MCAPI ::GameRule& _setDefaultValue(int i);
89
90 MCAPI ::std::string getLowercaseName() const;
91
92 MCAPI ::GameRule& operator=(::GameRule&&);
93
94 MCAPI ::GameRule& operator=(::GameRule const&);
95
96 MCAPI bool setBool(bool value, bool* pValidated, ::GameRule::ValidationError* errorOutput);
97
98 MCAPI bool setFloat(float value, bool* pValidated, ::GameRule::ValidationError* errorOutput);
99
100 MCAPI bool setInt(int value, bool* pValidated, ::GameRule::ValidationError* errorOutput);
101
102 MCAPI ::GameRule& setTagDataNotFoundCallback(::std::function<void(::GameRule&, ::BaseGameVersion const&)> cb);
103
104 MCAPI ::GameRule&
105 setValidateValueCallback(::std::function<bool(::GameRule::Value const&, ::GameRule::ValidationError*)> cb);
106
107 MCAPI ~GameRule();
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCAPI void* $ctor(::GameRule const&);
114
115 MCAPI void* $ctor(::GameRule&&);
116
117 MCAPI void* $ctor(::std::string const& name, bool canBeModifiedByPlayer);
118 // NOLINTEND
119
120public:
121 // destructor thunk
122 // NOLINTBEGIN
123 MCAPI void $dtor();
124 // NOLINTEND
125};
Definition BaseGameVersion.h:13
Definition GameRule.h:34
Definition GameRule.h:10
Definition Alias.h:14
Definition GameRule.h:25