LeviLamina
Loading...
Searching...
No Matches
PrefabDBServerPlayerServiceProvider.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/util/Mirror.h"
8#include "mc/util/Rotation.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPalette;
13class BlockSource;
14class ChunkPos;
15class Vec3;
16class WeakEntityRef;
17struct DimensionType;
18namespace Bedrock::PubSub { class Subscription; }
19namespace Editor::Prefabs { class PrefabDBPrefabInstance; }
20namespace Editor::Prefabs { class PrefabDBTemplate; }
21namespace Editor::Prefabs { class VisiblePrefabInstance; }
22namespace Editor::Prefabs { struct PrefabDBInstanceChangeEvent; }
23namespace Editor::Prefabs { struct PrefabDBTemplateChangeEvent; }
24namespace mce { class UUID; }
25// clang-format on
26
27namespace Editor::Prefabs {
28
30public:
31 // virtual functions
32 // NOLINTBEGIN
33 virtual ~PrefabDBServerPlayerServiceProvider() = default;
34
35 virtual ::std::vector<::WeakRef<::Editor::Prefabs::PrefabDBPrefabInstance>>
36 getInstancesInChunk(::DimensionType const& dimension, ::ChunkPos const& chunkPos) const = 0;
37
38 virtual ::std::optional<::Editor::Prefabs::VisiblePrefabInstance> generateVisibleInstanceDataFromPrefabInstance(
40 ) const = 0;
41
42 virtual ::WeakRef<::Editor::Prefabs::PrefabDBTemplate const> getTemplate(::mce::UUID const& templateId) const = 0;
43
44 virtual ::WeakRef<::Editor::Prefabs::PrefabDBTemplate> getTemplate(::mce::UUID const& templateId) = 0;
45
46 virtual ::WeakRef<::Editor::Prefabs::PrefabDBTemplate> getTemplate(::std::string_view name) = 0;
47
48 virtual ::WeakRef<::Editor::Prefabs::PrefabDBTemplate> createPrefabTemplate(
49 ::std::string const& name,
50 ::std::string const& displayName,
51 ::std::string const& description,
52 ::std::string const& notes,
53 ::std::vector<::std::string> const& tags
54 ) = 0;
55
56 virtual ::std::vector<::WeakRef<::Editor::Prefabs::PrefabDBTemplate const>> getTemplates() const = 0;
57
58 virtual bool deleteTemplate(::mce::UUID const& templateId) = 0;
59
60 virtual ::WeakRef<::Editor::Prefabs::PrefabDBTemplate> cloneTemplate(
62 ::std::string const& newName,
63 ::std::optional<::std::string> const& optNewDisplayName
64 ) = 0;
65
66 virtual ::WeakRef<::Editor::Prefabs::PrefabDBPrefabInstance> createPrefabInstance(
68 ::DimensionType const& dimension,
69 ::Vec3 const& position,
70 ::Mirror mirror,
71 ::Rotation rotation
72 ) = 0;
73
74 virtual void deletePrefabInstance(::WeakRef<::Editor::Prefabs::PrefabDBPrefabInstance> instanceRef) = 0;
75
76 virtual ::Bedrock::PubSub::Subscription subscribeToTemplateChanges(
77 ::std::function<void(::Editor::Prefabs::PrefabDBTemplateChangeEvent const&)> callback
78 ) = 0;
79
80 virtual ::Bedrock::PubSub::Subscription subscribeToInstanceChanges(
81 ::std::function<void(::Editor::Prefabs::PrefabDBInstanceChangeEvent const&)> callback
82 ) = 0;
83
84 virtual ::WeakRef<::Editor::Prefabs::PrefabDBPrefabInstance>
85 getInstance(::DimensionType const& dimension, ::mce::UUID const& instanceId) = 0;
86
87 virtual void bakePrefabInstanceToWorld(
88 ::BlockSource& region,
89 ::BlockPalette const& globalBlockPalette,
91 ::std::optional<::std::string_view> optionalCapturePath
92 ) = 0;
93
94 virtual void bake(
95 ::WeakEntityRef weakPlayerRef,
96 ::std::function<void(bool)> completionCallback,
97 ::std::function<void(::std::string_view)> logger
98 ) = 0;
99
100 virtual void unbake(
101 ::WeakEntityRef weakPlayerRef,
102 ::std::function<void(bool)> completionCallback,
103 ::std::function<void(::std::string_view)> logger
104 ) = 0;
105 // NOLINTEND
106
107public:
108 // virtual function thunks
109 // NOLINTBEGIN
110
111 // NOLINTEND
112};
113
114} // namespace Editor::Prefabs
Definition Subscription.h:10
Definition BlockPalette.h:21
Definition BlockSource.h:73
Definition ChunkPos.h:11
Definition PrefabDBPrefabInstance.h:27
Definition PrefabDBServerPlayerServiceProvider.h:29
Definition PrefabDBTemplate.h:28
Definition VisiblePrefabInstance.h:19
Definition Vec3.h:10
Definition WeakEntityRef.h:14
Definition WeakRef.h:8
Definition UUID.h:7
Definition DimensionType.h:5
Definition PrefabDBInstanceChangeEvent.h:7
Definition PrefabDBTemplateChangeEvent.h:7