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/TypedObjectHandle.h"
8#include "mc/deps/scripting/lifetime_registry/WeakHandleFromThis.h"
9#include "mc/deps/scripting/lifetime_registry/WeakLifetimeScope.h"
10#include "mc/scripting/modules/minecraft/ScriptWeatherType.h"
11#include "mc/scripting/modules/minecraft/events/IScriptWorldBeforeEvents.h"
12#include "mc/scripting/modules/minecraft/events/ScriptFilteredEventSignal.h"
13#include "mc/world/level/GameType.h"
14
15// auto generated forward declare list
16// clang-format off
17class Actor;
18class Level;
19class Player;
23struct ChatEvent;
25struct ItemUseEvent;
26struct ItemUseOnEvent;
29namespace ScriptModuleMinecraft { class ScriptBlockComponentRegistry; }
30namespace ScriptModuleMinecraft { class ScriptItemComponentRegistry; }
31namespace ScriptModuleMinecraft { struct EmptyFilter; }
32namespace ScriptModuleMinecraft { struct ScriptActorAddEffectBeforeEvent; }
33namespace ScriptModuleMinecraft { struct ScriptActorRemoveBeforeEvent; }
34namespace ScriptModuleMinecraft { struct ScriptChatSendBeforeEvent; }
35namespace ScriptModuleMinecraft { struct ScriptExplosionStartedBeforeEvent; }
36namespace ScriptModuleMinecraft { struct ScriptItemUseBeforeEvent; }
37namespace ScriptModuleMinecraft { struct ScriptItemUseOnBeforeEvent; }
38namespace ScriptModuleMinecraft { struct ScriptPlayerBreakBlockBeforeEvent; }
39namespace ScriptModuleMinecraft { struct ScriptPlayerGameModeChangeBeforeEvent; }
40namespace ScriptModuleMinecraft { struct ScriptPlayerInteractWithBlockBeforeEvent; }
41namespace ScriptModuleMinecraft { struct ScriptPlayerInteractWithEntityBeforeEvent; }
42namespace ScriptModuleMinecraft { struct ScriptPlayerLeaveBeforeEvent; }
43namespace ScriptModuleMinecraft { struct ScriptPlayerPlaceBlockBeforeEvent; }
44namespace ScriptModuleMinecraft { struct ScriptWeatherChangedBeforeEvent; }
45namespace ScriptModuleMinecraft { struct ScriptWorldInitializeBeforeEvent; }
46namespace ScriptModuleMinecraft { struct SignalNameSubscriberCount; }
47namespace ScriptModuleMinecraft::EventFilters { struct ScriptBlockEventFilter; }
48namespace Scripting { class ModuleBindingBuilder; }
49// clang-format on
50
51namespace ScriptModuleMinecraft {
52
55 public ::Scripting::WeakHandleFromThis<::ScriptModuleMinecraft::IScriptWorldBeforeEvents> {
56public:
57 // member variables
58 // NOLINTBEGIN
59 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
60 ::ll::TypedStorage<8, 8, ::Level*> mLevel;
61 ::ll::TypedStorage<8, 16, ::Scripting::TypedObjectHandle<::ScriptModuleMinecraft::ScriptWorldBeforeEvents>> mHandle;
62 ::ll::TypedStorage<
63 8,
64 32,
67 1,
69 mBeforeChatSignal;
70 ::ll::TypedStorage<
71 8,
72 32,
75 1,
77 mBeforeExplosionSignal;
78 ::ll::TypedStorage<
79 8,
80 32,
83 1,
85 mBeforeItemUseEventSignal;
86 ::ll::TypedStorage<
87 8,
88 32,
91 1,
93 mBeforeItemUseOnEventSignal;
94 ::ll::TypedStorage<
95 8,
96 32,
99 1,
101 mBeforePlayerBreakBlockEventSignal;
102 ::ll::TypedStorage<
103 8,
104 32,
107 1,
109 mBeforePlayerPlaceBlockEventSignal;
110 ::ll::TypedStorage<
111 8,
112 32,
115 1,
117 mBeforeActorRemoveEventSignal;
118 ::ll::TypedStorage<
119 8,
120 32,
123 1,
125 mBeforePlayerInteractWithBlockEventSignal;
126 ::ll::TypedStorage<
127 8,
128 32,
131 1,
133 mBeforePlayerInteractWithEntityEventSignal;
134 ::ll::TypedStorage<
135 8,
136 32,
139 1,
141 mBeforePlayerLeaveEventSignal;
142 ::ll::TypedStorage<
143 8,
144 32,
147 1,
149 mBeforePlayerGameModeChangeEventSignal;
150 ::ll::TypedStorage<
151 8,
152 32,
155 1,
157 mBeforeEffectAddEventSignal;
158 ::ll::TypedStorage<
159 8,
160 32,
163 1,
165 mBeforeWeatherChangedEventSignal;
166 ::ll::TypedStorage<
167 8,
168 32,
171 1,
173 mBeforeWorldInitializeEventSignal;
174 // NOLINTEND
175
176public:
177 // prevent constructor by default
181
182public:
183 // virtual functions
184 // NOLINTBEGIN
185 // vIndex: 0
186 virtual ~ScriptWorldBeforeEvents() /*override*/;
187
188 // vIndex: 8
189 virtual void onBeforeActorRemove(::Actor const& actor) /*override*/;
190
191 // vIndex: 1
192 virtual ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptChatSendBeforeEvent>>
193 onBeforeChat(::ChatEvent const& chatEvent, ::Player const& player) /*override*/;
194
195 // vIndex: 10
196 virtual ::std::optional<
198 onBeforeExplosion(::ExplosionStartedEvent const& event) /*override*/;
199
200 // vIndex: 13
201 virtual ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseBeforeEvent>>
202 onBeforeItemUse(::Player const& player, ::ItemUseEvent const& itemEvent) /*override*/;
203
204 // vIndex: 14
205 virtual ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseOnBeforeEvent>>
206 onBeforeItemUseOn(::Player const& player, ::ItemUseOnEvent const& itemEvent) /*override*/;
207
208 // vIndex: 11
209 virtual ::std::optional<
211 onBeforePlayerBreakBlock(::Player const& player, ::BlockTryDestroyByPlayerEvent const& eventData) /*override*/;
212
213 // vIndex: 12
214 virtual ::std::optional<
216 onBeforePlayerPlaceBlock(::Player const& player, ::BlockTryPlaceByPlayerEvent const& eventData) /*override*/;
217
218 // vIndex: 5
219 virtual ::std::optional<
221 onBeforePlayerInteractWithBlock(
222 ::Player& player,
224 ) /*override*/;
225
226 // vIndex: 4
227 virtual ::std::optional<
229 onBeforePlayerInteractWithEntity(
230 ::Player& player,
231 ::Actor& target,
233 ) /*override*/;
234
235 // vIndex: 6
236 virtual ::std::optional<
238 onBeforePlayerGameModeChange(::Player const& player, ::GameType fromGameMode, ::GameType toGameMode) /*override*/;
239
240 // vIndex: 2
241 virtual void onBeforeWorldInitialize(
243 blockComponentRegistry,
245 itemComponentRegistry
246 ) /*override*/;
247
248 // vIndex: 7
249 virtual void onBeforePlayerLeave(::Player const& player) /*override*/;
250
251 // vIndex: 9
252 virtual ::std::optional<
254 onBeforeEffectAddedEventSend(::ActorAddEffectEvent& actorEffectAddedEvent, ::Actor const& actor) /*override*/;
255
256 // vIndex: 3
257 virtual ::std::optional<
259 onBeforeWeatherChangedEvent(
260 ::ScriptModuleMinecraft::ScriptWeatherType previousWeatherType,
261 ::ScriptModuleMinecraft::ScriptWeatherType newWeatherType,
262 int duration
263 ) /*override*/;
264 // NOLINTEND
265
266public:
267 // member functions
268 // NOLINTBEGIN
270
272
273 MCAPI ::std::vector<::ScriptModuleMinecraft::SignalNameSubscriberCount> getFineGrainedSignalSubscriberStats() const;
274
275 MCAPI ::ScriptModuleMinecraft::ScriptWorldBeforeEvents&
277
278 MCAPI void registerListeners();
279 // NOLINTEND
280
281public:
282 // static functions
283 // NOLINTBEGIN
284 MCAPI static void bind(::Scripting::ModuleBindingBuilder& moduleBuilder);
285 // NOLINTEND
286
287public:
288 // constructor thunks
289 // NOLINTBEGIN
291
292 MCAPI void* $ctor(::Scripting::WeakLifetimeScope scope, ::Level* level);
293 // NOLINTEND
294
295public:
296 // destructor thunk
297 // NOLINTBEGIN
298 MCAPI void $dtor();
299 // NOLINTEND
300
301public:
302 // virtual function thunks
303 // NOLINTBEGIN
304 MCAPI void $onBeforeActorRemove(::Actor const& actor);
305
306 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptChatSendBeforeEvent>>
307 $onBeforeChat(::ChatEvent const& chatEvent, ::Player const& player);
308
309 MCAPI ::std::optional<
311 $onBeforeExplosion(::ExplosionStartedEvent const& event);
312
313 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseBeforeEvent>>
314 $onBeforeItemUse(::Player const& player, ::ItemUseEvent const& itemEvent);
315
316 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemUseOnBeforeEvent>>
317 $onBeforeItemUseOn(::Player const& player, ::ItemUseOnEvent const& itemEvent);
318
319 MCAPI ::std::optional<
321 $onBeforePlayerBreakBlock(::Player const& player, ::BlockTryDestroyByPlayerEvent const& eventData);
322
323 MCAPI ::std::optional<
325 $onBeforePlayerPlaceBlock(::Player const& player, ::BlockTryPlaceByPlayerEvent const& eventData);
326
327 MCAPI ::std::optional<
329 $onBeforePlayerInteractWithBlock(::Player& player, ::PlayerInteractWithBlockBeforeEvent const& eventData);
330
331 MCAPI ::std::optional<
333 $onBeforePlayerInteractWithEntity(
334 ::Player& player,
335 ::Actor& target,
337 );
338
339 MCAPI ::std::optional<
341 $onBeforePlayerGameModeChange(::Player const& player, ::GameType fromGameMode, ::GameType toGameMode);
342
343 MCAPI void $onBeforeWorldInitialize(
345 blockComponentRegistry,
347 itemComponentRegistry
348 );
349
350 MCAPI void $onBeforePlayerLeave(::Player const& player);
351
352 MCAPI ::std::optional<
354 $onBeforeEffectAddedEventSend(::ActorAddEffectEvent& actorEffectAddedEvent, ::Actor const& actor);
355
356 MCAPI ::std::optional<
358 $onBeforeWeatherChangedEvent(
359 ::ScriptModuleMinecraft::ScriptWeatherType previousWeatherType,
360 ::ScriptModuleMinecraft::ScriptWeatherType newWeatherType,
361 int duration
362 );
363 // NOLINTEND
364
365public:
366 // vftables
367 // NOLINTBEGIN
368 MCNAPI static void** $vftable();
369 // NOLINTEND
370};
371
372} // namespace ScriptModuleMinecraft
Definition Actor.h:102
Definition Level.h:243
Definition Player.h:123
Definition IScriptWorldBeforeEvents.h:40
Definition ScriptFilteredEventSignal.h:8
Definition ScriptWorldBeforeEvents.h:55
Definition ModuleBindingBuilder.h:29
Definition StrongTypedObjectHandle.h:8
Definition WeakHandleFromThis.h:8
Definition WeakLifetimeScope.h:7
Definition ActorAddEffectEvent.h:9
Definition BlockTryDestroyByPlayerEvent.h:16
Definition BlockTryPlaceByPlayerEvent.h:16
Definition ChatEvent.h:14
Definition ExplosionStartedEvent.h:15
Definition ItemUseEvent.h:9
Definition ItemUseOnEvent.h:11
Definition PlayerInteractWithBlockBeforeEvent.h:15
Definition PlayerInteractWithEntityBeforeEvent.h:14
Definition EmptyFilter.h:12
Definition ScriptActorAddEffectBeforeEvent.h:16
Definition ScriptActorRemoveBeforeEvent.h:16
Definition ScriptChatSendBeforeEvent.h:15
Definition ScriptExplosionStartedBeforeEvent.h:17
Definition ScriptItemUseBeforeEvent.h:15
Definition ScriptItemUseOnBeforeEvent.h:18
Definition ScriptPlayerBreakBlockBeforeEvent.h:23
Definition ScriptPlayerGameModeChangeBeforeEvent.h:15
Definition ScriptPlayerInteractWithBlockBeforeEvent.h:20
Definition ScriptPlayerInteractWithEntityBeforeEvent.h:17
Definition ScriptPlayerLeaveBeforeEvent.h:16
Definition ScriptPlayerPlaceBlockBeforeEvent.h:25
Definition ScriptWeatherChangedBeforeEvent.h:15
Definition ScriptWorldInitializeBeforeEvent.h:17