Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ScriptTickSignal.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/script_core/script_engine/scripting/Closure.h"
7
8// auto generated forward declare list
9// clang-format off
11// clang-format on
12
13namespace ScriptModuleMinecraft {
14
16public:
17 // ScriptTickSignal inner types declare
18 // clang-format off
19 struct PendingUnsubscribe;
20 struct Slot;
21 struct PendingSubscribe;
22 // clang-format on
23
24 // ScriptTickSignal inner types define
25 enum class IntervalStatus : uint {
26 Once = 0,
27 Repeat = 1,
28 Expired = 2,
29 };
30
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<4, 4, uint> id;
36 // NOLINTEND
37 };
38
39 struct Slot {
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<4, 4, uint> id;
44 ::ll::TypedStorage<4, 4, uint> lastTick;
45 ::ll::TypedStorage<4, 4, ::ScriptModuleMinecraft::ScriptTickSignal::IntervalStatus> status;
46 ::ll::TypedStorage<4, 4, uint> initialInterval;
47 ::ll::TypedStorage<4, 4, uint> currentInterval;
48 ::ll::TypedStorage<8, 120, ::std::variant<::Scripting::Closure<void()>, ::std::function<void()>>> closure;
49 // NOLINTEND
50
51 public:
52 // member functions
53 // NOLINTBEGIN
54 MCNAPI ~Slot();
55 // NOLINTEND
56
57 public:
58 // destructor thunk
59 // NOLINTBEGIN
60 MCNAPI void $dtor();
61 // NOLINTEND
62 };
63
65 public:
66 // member variables
67 // NOLINTBEGIN
68 ::ll::TypedStorage<8, 144, ::ScriptModuleMinecraft::ScriptTickSignal::Slot> slot;
69 // NOLINTEND
70
71 public:
72 // member functions
73 // NOLINTBEGIN
75 // NOLINTEND
76
77 public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCNAPI void $dtor();
81 // NOLINTEND
82 };
83
84public:
85 // member variables
86 // NOLINTBEGIN
87 ::ll::TypedStorage<4, 4, uint> mNextId;
88 ::ll::TypedStorage<1, 1, bool> mDispatching;
89 ::ll::TypedStorage<8, 24, ::std::vector<::ScriptModuleMinecraft::ScriptTickSignal::Slot>> mActive;
90 ::ll::TypedStorage<
91 8,
92 24,
93 ::std::vector<::std::variant<
96 mPending;
97 // NOLINTEND
98
99public:
100 // member functions
101 // NOLINTBEGIN
102 MCNAPI void processTick(uint currentTick, ::ScriptDeferredFlushTracker& deferredTracker);
103
104 MCNAPI uint scheduleInterval(::Scripting::Closure<void()>&& closure, uint interval, uint currentTick);
105
106 MCNAPI uint scheduleTimeout(::Scripting::Closure<void()>&& closure, uint delay, uint currentTick);
107
108 MCNAPI uint scheduleTimeout(::std::function<void()> function, uint delay, uint currentTick);
109
110 MCNAPI uint scheduleTimeoutSafe(::Scripting::Closure<void()>&& closure, uint currentTick);
111 // NOLINTEND
112};
113
114} // namespace ScriptModuleMinecraft
Definition ScriptDeferredFlushTracker.h:13
Definition ScriptTickSignal.h:15
MCAPI uint scheduleTimeout(::Scripting::Closure< void()> &&closure, uint delay, uint currentTick)
MCAPI uint scheduleTimeoutSafe(::Scripting::Closure< void()> &&closure, uint currentTick)
MCAPI uint scheduleInterval(::Scripting::Closure< void()> &&closure, uint interval, uint currentTick)
MCAPI uint scheduleTimeout(::std::function< void()> function, uint delay, uint currentTick)
MCAPI void processTick(uint currentTick, ::ScriptDeferredFlushTracker &deferredTracker)
Definition Closure.h:8
Definition ScriptTickSignal.h:39