LeviLamina
Loading...
Searching...
No Matches
ScriptWorldBeforeEvents.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
7#include "mc/deps/scripting/lifetime_registry/WeakHandleFromThis.h"
8#include "mc/scripting/modules/minecraft/ScriptWeatherType.h"
9#include "mc/scripting/modules/minecraft/events/IScriptWorldBeforeEvents.h"
10#include "mc/world/level/GameType.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Level;
16class Player;
20struct ChatEvent;
23struct ItemUseEvent;
24struct ItemUseOnEvent;
27namespace ScriptModuleMinecraft { class ScriptBlockComponentRegistry; }
28namespace ScriptModuleMinecraft { class ScriptItemComponentRegistry; }
29namespace ScriptModuleMinecraft { struct ScriptActorAddEffectBeforeEvent; }
30namespace ScriptModuleMinecraft { struct ScriptChatSendBeforeEvent; }
31namespace ScriptModuleMinecraft { struct ScriptExplosionStartedBeforeEvent; }
32namespace ScriptModuleMinecraft { struct ScriptItemUseBeforeEvent; }
33namespace ScriptModuleMinecraft { struct ScriptItemUseOnBeforeEvent; }
34namespace ScriptModuleMinecraft { struct ScriptPlayerBreakBlockBeforeEvent; }
35namespace ScriptModuleMinecraft { struct ScriptPlayerGameModeChangeBeforeEvent; }
36namespace ScriptModuleMinecraft { struct ScriptPlayerInteractWithBlockBeforeEvent; }
37namespace ScriptModuleMinecraft { struct ScriptPlayerInteractWithEntityBeforeEvent; }
38namespace ScriptModuleMinecraft { struct ScriptPlayerPlaceBlockBeforeEvent; }
39namespace ScriptModuleMinecraft { struct ScriptWeatherChangedBeforeEvent; }
40namespace ScriptModuleMinecraft { struct SignalNameSubscriberCount; }
41namespace Scripting { class ModuleBindingBuilder; }
42namespace Scripting { class WeakLifetimeScope; }
43// clang-format on
44
45namespace ScriptModuleMinecraft {
46
49 public ::Scripting::WeakHandleFromThis<::ScriptModuleMinecraft::IScriptWorldBeforeEvents> {
50public:
51 // member variables
52 // NOLINTBEGIN
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
80
81public:
82 // virtual functions
83 // NOLINTBEGIN
84 // vIndex: 0
85 virtual ~ScriptWorldBeforeEvents() /*override*/;
86
87 // vIndex: 8
88 virtual void onBeforeActorRemove(::Actor const& actor) /*override*/;
89
90 // vIndex: 1
91 virtual ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptChatSendBeforeEvent>>
92 onBeforeChat(::ChatEvent const& chatEvent, ::Player const& player) /*override*/;
93
94 // vIndex: 10
95 virtual ::std::optional<
97 onBeforeExplosion(::ExplosionStartedEvent const& event) /*override*/;
98
99 // vIndex: 13
100 virtual ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseBeforeEvent>>
101 onBeforeItemUse(::Player const& player, ::ItemUseEvent const& itemEvent) /*override*/;
102
103 // vIndex: 14
104 virtual ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseOnBeforeEvent>>
105 onBeforeItemUseOn(::Player const& player, ::ItemUseOnEvent const& itemEvent) /*override*/;
106
107 // vIndex: 11
108 virtual ::std::optional<
110 onBeforePlayerBreakBlock(::Player const& player, ::BlockTryDestroyByPlayerEvent const& eventData) /*override*/;
111
112 // vIndex: 12
113 virtual ::std::optional<
115 onBeforePlayerPlaceBlock(::Player const& player, ::BlockTryPlaceByPlayerEvent const& eventData) /*override*/;
116
117 // vIndex: 5
118 virtual ::std::optional<
120 onBeforePlayerInteractWithBlock(
121 ::Player& player,
123 ) /*override*/;
124
125 // vIndex: 4
126 virtual ::std::optional<
128 onBeforePlayerInteractWithEntity(
129 ::Player& player,
130 ::Actor& target,
132 ) /*override*/;
133
134 // vIndex: 6
135 virtual ::std::optional<
137 onBeforePlayerGameModeChange(::Player const&, ::GameType, ::GameType) /*override*/;
138
139 // vIndex: 2
140 virtual void onBeforeWorldInitialize(
142 blockComponentRegistry,
144 itemComponentRegistry
145 ) /*override*/;
146
147 // vIndex: 7
148 virtual void onBeforePlayerLeave(::Player const& player) /*override*/;
149
150 // vIndex: 15
151 virtual void onClientJoinedEvent(::ClientJoinedEvent const& e) /*override*/;
152
153 // vIndex: 9
154 virtual ::std::optional<
156 onBeforeEffectAddedEventSend(::ActorAddEffectEvent& actorEffectAddedEvent, ::Actor const& actor) /*override*/;
157
158 // vIndex: 3
159 virtual ::std::optional<
161 onBeforeWeatherChangedEvent(
162 ::ScriptModuleMinecraft::ScriptWeatherType previousWeatherType,
163 ::ScriptModuleMinecraft::ScriptWeatherType newWeatherType,
164 int duration
165 ) /*override*/;
166 // NOLINTEND
167
168public:
169 // member functions
170 // NOLINTBEGIN
172
174
175 MCAPI ::std::vector<::ScriptModuleMinecraft::SignalNameSubscriberCount> getFineGrainedSignalSubscriberStats() const;
176
177 MCAPI void onTick();
178
179 MCAPI ::ScriptModuleMinecraft::ScriptWorldBeforeEvents&
181
182 MCAPI void registerListeners();
183 // NOLINTEND
184
185public:
186 // static functions
187 // NOLINTBEGIN
188 MCAPI static void bind(::Scripting::ModuleBindingBuilder& moduleBuilder);
189 // NOLINTEND
190
191public:
192 // constructor thunks
193 // NOLINTBEGIN
195
196 MCAPI void* $ctor(::Scripting::WeakLifetimeScope scope, ::Level* level);
197 // NOLINTEND
198
199public:
200 // destructor thunk
201 // NOLINTBEGIN
202 MCAPI void $dtor();
203 // NOLINTEND
204
205public:
206 // virtual function thunks
207 // NOLINTBEGIN
208 MCAPI void $onBeforeActorRemove(::Actor const& actor);
209
210 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptChatSendBeforeEvent>>
211 $onBeforeChat(::ChatEvent const& chatEvent, ::Player const& player);
212
213 MCAPI ::std::optional<
215 $onBeforeExplosion(::ExplosionStartedEvent const& event);
216
217 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseBeforeEvent>>
218 $onBeforeItemUse(::Player const& player, ::ItemUseEvent const& itemEvent);
219
220 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseOnBeforeEvent>>
221 $onBeforeItemUseOn(::Player const& player, ::ItemUseOnEvent const& itemEvent);
222
223 MCAPI ::std::optional<
225 $onBeforePlayerBreakBlock(::Player const& player, ::BlockTryDestroyByPlayerEvent const& eventData);
226
227 MCAPI ::std::optional<
229 $onBeforePlayerPlaceBlock(::Player const& player, ::BlockTryPlaceByPlayerEvent const& eventData);
230
231 MCAPI ::std::optional<
233 $onBeforePlayerInteractWithBlock(::Player& player, ::PlayerInteractWithBlockBeforeEvent const& eventData);
234
235 MCAPI ::std::optional<
237 $onBeforePlayerInteractWithEntity(
238 ::Player& player,
239 ::Actor& target,
241 );
242
243 MCAPI void $onBeforeWorldInitialize(
245 blockComponentRegistry,
247 itemComponentRegistry
248 );
249
250 MCAPI void $onBeforePlayerLeave(::Player const& player);
251
252 MCAPI void $onClientJoinedEvent(::ClientJoinedEvent const& e);
253
254 MCAPI ::std::optional<
256 $onBeforeEffectAddedEventSend(::ActorAddEffectEvent& actorEffectAddedEvent, ::Actor const& actor);
257
258 MCAPI ::std::optional<
260 $onBeforeWeatherChangedEvent(
261 ::ScriptModuleMinecraft::ScriptWeatherType previousWeatherType,
262 ::ScriptModuleMinecraft::ScriptWeatherType newWeatherType,
263 int duration
264 );
265 // NOLINTEND
266
267public:
268 // vftables
269 // NOLINTBEGIN
270 MCAPI static void** $vftable();
271 // NOLINTEND
272};
273
274} // namespace ScriptModuleMinecraft
Definition Actor.h:104
Definition Level.h:234
Definition Player.h:119
Definition IScriptWorldBeforeEvents.h:41
Definition ScriptWorldBeforeEvents.h:49
Definition ModuleBindingBuilder.h:30
Definition StrongTypedObjectHandle.h:8
Definition WeakHandleFromThis.h:8
Definition WeakLifetimeScope.h:12
Definition ActorAddEffectEvent.h:11
Definition BlockTryDestroyByPlayerEvent.h:16
Definition BlockTryPlaceByPlayerEvent.h:16
Definition ChatEvent.h:14
Definition ClientJoinedEvent.h:10
Definition ExplosionStartedEvent.h:15
Definition ItemUseEvent.h:11
Definition ItemUseOnEvent.h:13
Definition PlayerInteractWithBlockBeforeEvent.h:15
Definition PlayerInteractWithEntityBeforeEvent.h:14
Definition Alias.h:14