LeviLamina
Loading...
Searching...
No Matches
AutonomousActorManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/deps/game_refs/OwnerPtr.h"
9#include "mc/deps/game_refs/StackRefResult.h"
10#include "mc/deps/game_refs/WeakRef.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class ActorFactory;
16class ActorManager;
17class Dimension;
18class EntityContext;
19class EntityRegistry;
23class LevelChunk;
24class LevelStorage;
25class ListTag;
26class WeakEntityRef;
27struct ActorUniqueID;
28// clang-format on
29
30class AutonomousActorManager {
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::EntityContext>>> mOwnedInactiveAutonomousActors;
35 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mActiveAutonomousActors;
36 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ActorManager> const> mActorManager;
37 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferences;
38 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnAutonomousActorRemovedSubscription;
39 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkLoaded;
40 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkDiscarded;
41 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveGameDataSubscription;
42 ::ll::TypedStorage<8, 16, ::WeakRef<::EntityRegistry>> mEntityRegistry;
43 // NOLINTEND
44
45public:
46 // prevent constructor by default
47 AutonomousActorManager();
48
49public:
50 // member functions
51 // NOLINTBEGIN
52 MCAPI AutonomousActorManager(
53 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
54 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
55 );
56
57 MCAPI void _moveActiveAutonomousActorEntityToInactive(::Actor& actor, ::LevelChunk& levelChunk);
58
59 MCAPI void _onChunkDiscarded(::LevelChunk& levelChunk);
60
61 MCAPI void _onChunkLoaded(::IAddActorEntityProxy& addActorEntityProxy, ::LevelChunk& levelChunk);
62
63 MCAPI void _onRemoveActorEntityReferences(::Actor& actor);
64
65 MCAPI void _saveAllAutonomousActors(::LevelStorage& levelStorage);
66
67 MCAPI ::Actor*
68 addAutonomousActorEntity(::IAddActorEntityProxy& addActorEntityProxy, ::OwnerPtr<::EntityContext> entity);
69
70 MCAPI ::Actor* addAutonomousActorEntity(::Dimension& dimension, ::OwnerPtr<::EntityContext> entity);
71
72 MCAPI bool hasOwnedInactiveAutonomousActorWithUniqueID(::ActorUniqueID actorUniqueID) const;
73
74 MCAPI void loadAutonomousActorsFromDisk(::LevelStorage& levelStorage, ::ActorFactory& actorFactory);
75
76 MCAPI void onLevelTearingDown();
77
78 MCAPI void registerForLevelChunkEvents(::ILevelChunkEventManagerConnector& levelChunkEventManagerConnector);
79
80 MCAPI void registerLevelStorageManagerListener(::ILevelStorageManagerConnector& levelStorageManagerConnector);
81
82 MCAPI bool removeActiveAutonomousActorEntity(::WeakEntityRef weakEntityRef);
83
84 MCAPI ~AutonomousActorManager();
85 // NOLINTEND
86
87public:
88 // static functions
89 // NOLINTBEGIN
90 MCAPI static void _deduplicateDuplicateActorsFromList(::ListTag& listTag);
91 // NOLINTEND
92
93public:
94 // constructor thunks
95 // NOLINTBEGIN
96 MCAPI void* $ctor(
97 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
98 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
99 );
100 // NOLINTEND
101
102public:
103 // destructor thunk
104 // NOLINTBEGIN
105 MCAPI void $dtor();
106 // NOLINTEND
107};
Definition ActorFactory.h:34
Definition ActorManager.h:32
Definition Actor.h:123
Definition Dimension.h:88
Definition EntityContext.h:17
Definition EntityRegistry.h:11
Definition IAddActorEntityProxy.h:10
Definition ILevelChunkEventManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelChunk.h:87
Definition LevelStorage.h:26
Definition ListTag.h:21
Definition OwnerPtr.h:7
Definition StackRefResult.h:7
Definition WeakEntityRef.h:14
Definition ActorUniqueID.h:10