LeviLamina
Loading...
Searching...
No Matches
ActorManager.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/Connector.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
9#include "mc/deps/core/utility/pub_sub/Subscription.h"
10#include "mc/deps/game_refs/OwnerPtr.h"
11#include "mc/platform/Result.h"
12#include "mc/world/actor/ActorInitializationMethod.h"
13#include "mc/world/level/ActorValidationError.h"
14#include "mc/world/level/IActorManagerConnector.h"
15
16// auto generated forward declare list
17// clang-format off
18class Actor;
20class ActorRuntimeID;
21class Dimension;
22class EntityContext;
26class LevelChunk;
27class WeakEntityRef;
28struct ActorUniqueID;
29namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
30// clang-format on
31
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::EntityContext>>> mEntities;
37 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::IActorManagerProxy>>> mActorManagerProxy;
38 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ActorGarbageCollector>> mActorGarbageCollector;
39 ::ll::TypedStorage<
40 8,
41 128,
43 mOnActorEntityAdded;
44 ::ll::TypedStorage<
45 8,
46 128,
47 ::Bedrock::PubSub::
48 Publisher<void(::Actor&, ::ActorInitializationMethod), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
49 mPostReloadActor;
50 ::ll::TypedStorage<
51 8,
52 128,
54 mOnRemoveActorEntityReferences;
55 ::ll::TypedStorage<1, 1, bool> mIsLevelTearingDown;
56 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkDiscarded;
57 // NOLINTEND
58
59public:
60 // prevent constructor by default
62
63public:
64 // virtual functions
65 // NOLINTBEGIN
66 // vIndex: 3
67 virtual ~ActorManager();
68
69 // vIndex: 0
70 virtual ::Bedrock::PubSub::Connector<void(::Actor&)>& getRegisterEntityAddedConnector() /*override*/;
71
72 // vIndex: 1
73 virtual ::Bedrock::PubSub::Connector<void(::Actor&, ::ActorInitializationMethod)>&
74 getRegisterPostReloadActorConnector() /*override*/;
75
76 // vIndex: 2
77 virtual ::Bedrock::PubSub::Connector<void(::Actor&)>&
78 getRegisterOnRemoveActorEntityReferenceConnector() /*override*/;
79 // NOLINTEND
80
81public:
82 // member functions
83 // NOLINTBEGIN
84 MCAPI ActorManager(
85 ::std::unique_ptr<::IActorManagerProxy> actorManagerProxy,
86 ::Bedrock::NotNullNonOwnerPtr<::ActorGarbageCollector> actorGarbageCollector
87 );
88
89 MCAPI void _onChunkDiscarded(::LevelChunk& levelChunk);
90
91 MCAPI ::Bedrock::Result<::Actor*, ::ActorValidationError>
92 addActorEntity(::IAddActorEntityProxy& addActorEntityProxy, ::OwnerPtr<::EntityContext> entity);
93
94 MCAPI ::Bedrock::Result<::Actor*, ::ActorValidationError>
95 addActorEntity(::Dimension& dimension, ::OwnerPtr<::EntityContext> entity);
96
97 MCAPI ::Bedrock::Result<::Actor*, ::ActorValidationError> addActorEntity(
98 ::Dimension& dimension,
99 ::ActorUniqueID actorUniqueID,
100 ::ActorRuntimeID actorRuntimeID,
102 );
103
104 MCAPI ::Bedrock::Result<::Actor*, ::ActorValidationError>
105 addGlobalActorEntity(::IAddActorEntityProxy& addActorEntityProxy, ::OwnerPtr<::EntityContext> entity);
106
107 MCAPI void cleanupActorEntityReferencesGarbageCollect(::OwnerPtr<::EntityContext> entity);
108
109 MCAPI ::OwnerPtr<::EntityContext> deleteActorEntityFromWorldAndTakeEntity(::WeakEntityRef entityRef);
110
111 MCAPI void forceRemoveActorFromWorld(::Actor& actor);
112
113 MCAPI void onChunkDiscarded(::LevelChunk const& levelChunk, ::WeakEntityRef entityRef);
114
115 MCAPI void registerForLevelChunkEvents(::ILevelChunkEventManagerConnector& levelChunkEventManagerConnector);
116
117 MCAPI ::OwnerPtr<::EntityContext> removeActorEntityAndTakeEntity(::WeakEntityRef entityRef);
118
119 MCAPI void removeActorEntityReferencesForDeletion(::Actor& actor);
120
121 MCAPI ::OwnerPtr<::EntityContext> removeEntity(::WeakEntityRef entityRef);
122
123 MCAPI ::OwnerPtr<::EntityContext> takeEntity(::WeakEntityRef entityRef, ::LevelChunk& levelChunk);
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCAPI void* $ctor(
130 ::std::unique_ptr<::IActorManagerProxy> actorManagerProxy,
131 ::Bedrock::NotNullNonOwnerPtr<::ActorGarbageCollector> actorGarbageCollector
132 );
133 // NOLINTEND
134
135public:
136 // destructor thunk
137 // NOLINTBEGIN
138 MCAPI void $dtor();
139 // NOLINTEND
140
141public:
142 // virtual function thunks
143 // NOLINTBEGIN
144 MCFOLD ::Bedrock::PubSub::Connector<void(::Actor&)>& $getRegisterEntityAddedConnector();
145
146 MCFOLD ::Bedrock::PubSub::Connector<void(::Actor&, ::ActorInitializationMethod)>&
147 $getRegisterPostReloadActorConnector();
148
149 MCAPI ::Bedrock::PubSub::Connector<void(::Actor&)>& $getRegisterOnRemoveActorEntityReferenceConnector();
150 // NOLINTEND
151
152public:
153 // vftables
154 // NOLINTBEGIN
155 MCNAPI static void** $vftable();
156 // NOLINTEND
157};
Definition ActorGarbageCollector.h:13
Definition ActorManager.h:32
static MCAPI void ** $vftable()
Definition ActorRuntimeID.h:5
Definition Actor.h:102
Definition Publisher.h:8
Definition Dimension.h:83
Definition EntityContext.h:16
Definition IActorManagerConnector.h:14
Definition IActorManagerProxy.h:14
Definition IAddActorEntityProxy.h:10
Definition ILevelChunkEventManagerConnector.h:14
Definition LevelChunk.h:78
Definition OwnerPtr.h:7
Definition WeakEntityRef.h:14
Definition ActorUniqueID.h:5