LeviLamina
Loading...
Searching...
No Matches
MobEvents.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/BasicTimer.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/world/level/MobEvent.h"
9#include "mc/world/level/MobEventsIndex.h"
10
11// auto generated forward declare list
12// clang-format off
13class CompoundTag;
15class LevelStorage;
16// clang-format on
17
18class MobEvents {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<8, 216, ::std::array<::MobEvent, 3>> mMobEvents;
23 ::ll::TypedStorage<8, 80, ::BasicTimer> mSaveTimer;
24 ::ll::TypedStorage<8, 8, ::LevelStorage&> mLevelStorage;
25 ::ll::TypedStorage<1, 1, bool> mEventsEnabled;
26 ::ll::TypedStorage<1, 1, bool> mNeedsToSave;
27 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveSubscription;
28 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelStorageManagerStartLeaveGameSubscription;
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 MobEvents& operator=(MobEvents const&);
34 MobEvents(MobEvents const&);
35 MobEvents();
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual ~MobEvents();
41 // NOLINTEND
42
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI explicit MobEvents(::LevelStorage& levelStorage);
47
48 MCAPI void _onSaveEvent(::LevelStorage&);
49
50 MCFOLD bool areEventsEnabled() const;
51
52 MCAPI void deserialize(::CompoundTag const& tag);
53
54 MCAPI ::MobEvent const& getEvent(::MobEventsIndex eventIndex) const;
55
56 MCAPI ::MobEventsIndex getIndexFromName(::std::string const& name) const;
57
58 MCAPI void
59 initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector);
60
61 MCAPI bool isEnabled(::MobEventsIndex eventIndex) const;
62
63 MCAPI void readFromLevelStorage();
64
65 MCAPI ::std::unique_ptr<::CompoundTag> serialize() const;
66
67 MCAPI void setEnabled(::MobEventsIndex eventIndex, bool newVal);
68
69 MCAPI void setEventsEnabled(bool newVal);
70
71 MCAPI void setMarketplaceDefaults();
72
73 MCAPI void tick();
74
75 MCAPI void writeToLevelStorage();
76 // NOLINTEND
77
78public:
79 // static variables
80 // NOLINTBEGIN
81 MCAPI static ::std::string const& EVENTS_ENABLED_STRING();
82 // NOLINTEND
83
84public:
85 // constructor thunks
86 // NOLINTBEGIN
87 MCAPI void* $ctor(::LevelStorage& levelStorage);
88 // NOLINTEND
89
90public:
91 // destructor thunk
92 // NOLINTBEGIN
93 MCAPI void $dtor();
94 // NOLINTEND
95
96public:
97 // vftables
98 // NOLINTBEGIN
99 MCNAPI static void** $vftable();
100 // NOLINTEND
101};
Definition CompoundTag.h:23
Definition ILevelStorageManagerConnector.h:13
Definition LevelStorage.h:26
static MCAPI void ** $vftable()