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
29 ::ll::TypedStorage<1, 4, bool> boolVal;
30 ::ll::TypedStorage<4, 4, int> intVal;
31 ::ll::TypedStorage<4, 4, float> floatVal;
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
47 // NOLINTEND
48
49 public:
50 // destructor thunk
51 // NOLINTBEGIN
52 MCNAPI 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 // prevent constructor by default
79 GameRule();
80
81public:
82 // member functions
83 // NOLINTBEGIN
84 MCAPI GameRule(::GameRule const&);
85
86 MCAPI GameRule(::GameRule&&);
87
88 MCAPI GameRule(::std::string const& name, bool canBeModifiedByPlayer);
89
90 MCAPI ::GameRule& _setDefaultValue(bool b);
91
92 MCAPI ::GameRule& _setDefaultValue(int i);
93
94 MCAPI ::std::string getLowercaseName() const;
95
96 MCAPI ::GameRule& operator=(::GameRule&&);
97
98 MCAPI ::GameRule& operator=(::GameRule const&);
99
100 MCAPI bool setBool(bool value, bool* pValidated, ::GameRule::ValidationError* errorOutput);
101
102 MCAPI bool setFloat(float value, bool* pValidated, ::GameRule::ValidationError* errorOutput);
103
104 MCAPI bool setInt(int value, bool* pValidated, ::GameRule::ValidationError* errorOutput);
105
106 MCAPI ::GameRule& setTagDataNotFoundCallback(::std::function<void(::GameRule&, ::BaseGameVersion const&)> cb);
107
108 MCAPI ::GameRule&
109 setValidateValueCallback(::std::function<bool(::GameRule::Value const&, ::GameRule::ValidationError*)> cb);
110
111 MCAPI ~GameRule();
112 // NOLINTEND
113
114public:
115 // constructor thunks
116 // NOLINTBEGIN
117 MCAPI void* $ctor(::GameRule const&);
118
119 MCAPI void* $ctor(::GameRule&&);
120
121 MCAPI void* $ctor(::std::string const& name, bool canBeModifiedByPlayer);
122 // NOLINTEND
123
124public:
125 // destructor thunk
126 // NOLINTBEGIN
127 MCAPI void $dtor();
128 // NOLINTEND
129};
Definition BaseGameVersion.h:8
Definition GameRule.h:34
Definition GameRule.h:10
Definition GameRule.h:25