Skip to content
LeviMC
English
AutoLightDark
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 WeakEntityRef;
26struct ActorUniqueID;
27// clang-format on
28
29class AutonomousActorManager {
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::EntityContext>>> mOwnedInactiveAutonomousActors;
34 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mActiveAutonomousActors;
35 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ActorManager> const> mActorManager;
36 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferences;
37 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnAutonomousActorRemovedSubscription;
38 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkLoaded;
39 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkDiscarded;
40 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveGameDataSubscription;
41 ::ll::TypedStorage<8, 16, ::WeakRef<::EntityRegistry>> mEntityRegistry;
42 // NOLINTEND
43
44public:
45 // prevent constructor by default
46 AutonomousActorManager();
47
48public:
49 // member functions
50 // NOLINTBEGIN
52 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
53 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
54 );
55
56 MCNAPI void _onChunkDiscarded(::LevelChunk& levelChunk);
57
59
60 MCNAPI void _saveAllAutonomousActors(::LevelStorage& levelStorage);
61
62 MCNAPI ::Actor*
64
66
68
69 MCNAPI void loadAutonomousActorsFromDisk(::LevelStorage& levelStorage, ::ActorFactory& actorFactory);
70
71 MCNAPI void registerForLevelChunkEvents(::ILevelChunkEventManagerConnector& levelChunkEventManagerConnector);
72
73 MCNAPI void registerLevelStorageManagerListener(::ILevelStorageManagerConnector& levelStorageManagerConnector);
74
76 // NOLINTEND
77
78public:
79 // constructor thunks
80 // NOLINTBEGIN
81 MCNAPI void* $ctor(
82 ::gsl::not_null<::StackRefResult<::EntityRegistry>> const& entityRegistry,
83 ::Bedrock::NotNullNonOwnerPtr<::ActorManager> actorManager
84 );
85 // NOLINTEND
86
87public:
88 // destructor thunk
89 // NOLINTBEGIN
90 MCNAPI void $dtor();
91 // NOLINTEND
92};
Definition ActorFactory.h:33
Definition ActorManager.h:30
Definition Actor.h:116
MCAPI void _onChunkDiscarded(::LevelChunk &levelChunk)
MCAPI::Actor * addAutonomousActorEntity(::Dimension &dimension, ::OwnerPtr<::EntityContext > entity)
MCAPI::Actor * addAutonomousActorEntity(::IAddActorEntityProxy &addActorEntityProxy, ::OwnerPtr<::EntityContext > entity)
MCAPI AutonomousActorManager(::gsl::not_null<::StackRefResult<::EntityRegistry > > const &entityRegistry, ::Bedrock::NotNullNonOwnerPtr<::ActorManager > actorManager)
MCAPI void registerLevelStorageManagerListener(::ILevelStorageManagerConnector &levelStorageManagerConnector)
MCAPI void registerForLevelChunkEvents(::ILevelChunkEventManagerConnector &levelChunkEventManagerConnector)
MCAPI void loadAutonomousActorsFromDisk(::LevelStorage &levelStorage, ::ActorFactory &actorFactory)
MCAPI void _onRemoveActorEntityReferences(::Actor &actor)
MCAPI bool hasOwnedInactiveAutonomousActorWithUniqueID(::ActorUniqueID actorUniqueID) const
MCAPI void * $ctor(::gsl::not_null<::StackRefResult<::EntityRegistry > > const &entityRegistry, ::Bedrock::NotNullNonOwnerPtr<::ActorManager > actorManager)
MCAPI void _saveAllAutonomousActors(::LevelStorage &levelStorage)
Definition Dimension.h:86
Definition EntityContext.h:15
Definition EntityRegistry.h:10
Definition IAddActorEntityProxy.h:10
Definition ILevelChunkEventManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelChunk.h:76
Definition LevelStorage.h:26
Definition OwnerPtr.h:7
Definition StackRefResult.h:7
Definition WeakEntityRef.h:14
Definition ActorUniqueID.h:5