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