LeviLamina
Loading...
Searching...
No Matches
ResourcePackStack.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/resource/PackType.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/platform/brstd/function_ref.h"
9
10// auto generated forward declare list
11// clang-format off
12class ContentIdentity;
13class ContentTierInfo;
16class PackInstance;
20struct PackIdVersion;
21struct PackInstanceId;
22// clang-format on
23
24class ResourcePackStack {
25public:
26 // ResourcePackStack inner types define
27 using PackInstanceStack = ::std::vector<::PackInstance>;
28
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 24, ::std::vector<::PackInstance>> mStack;
33 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSourceReport>> mPackSourceReport;
34 // NOLINTEND
35
36public:
37 // virtual functions
38 // NOLINTBEGIN
39 virtual ~ResourcePackStack();
40
41 virtual ::std::vector<::LoadedResourceData> loadAllVersionsOf(::ResourceLocation const& resourceLocation) const;
42
43 virtual bool
44 loadAllVersionsOf(::ResourceLocation const& resourceLocation, ::ResourcePackMergeStrategy& mergeStrategy) const;
45
46 virtual bool loadAllVersionsOf(
47 ::ResourceLocation const& resourceLocation,
48 ::brstd::function_ref<bool(::PackInstance const&)> packInstanceFilter,
49 ::ResourcePackMergeStrategy& mergeStrategy
50 ) const;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI ResourcePackStack();
57
58#ifdef LL_PLAT_C
59 MCAPI ResourcePackStack(
60 ::std::vector<::PackInstance> const& packs,
61 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo
62 );
63#endif
64
65 MCAPI ResourcePackStack(
66 ::std::vector<::PackInstanceId> const& identities,
67 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
68 bool anyVersion
69 );
70
71 MCAPI void _setLoadingReport(::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo);
72
73 MCAPI void
74 add(::PackInstance packInstance,
75 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
76 bool isDependent);
77
78#ifdef LL_PLAT_C
79 MCAPI void ensureSupportedSubpacks(::ContentTierInfo const& contentInfoTier);
80#endif
81
82 MCAPI ::std::vector<::std::string> getPackTelemetryNamesWithVersion(::PackType type) const;
83
84 MCAPI ::std::vector<::PackInstance> getPacksWhereAssetExtractionNotViable(
85 ::std::function<::std::string(::ContentIdentity const&)> getContentKey,
86 ::std::string const& sourceContext
87 ) const;
88
89 MCAPI void getSplitStacks(::ResourcePackStack& clientStack, ::ResourcePackStack& serverStack) const;
90
91#ifdef LL_PLAT_C
92 MCAPI ::std::vector<::PackInstanceId> getStackAsIdentities() const;
93#endif
94
95 MCAPI bool hasPlatformLockedContent() const;
96
97#ifdef LL_PLAT_C
98 MCAPI bool hasRestrictedContent() const;
99
100 MCAPI bool isOnStack(::PackIdVersion const& packIdentity) const;
101#endif
102
103 MCAPI void iteratePacks(::std::function<void(::PackInstance const&)> const& callback) const;
104
105 MCAPI void removeDuplicates();
106
107 MCAPI void removeInvalidPacks();
108
109#ifdef LL_PLAT_C
110 MCAPI void removeUnsupportedPacks(::ContentTierInfo const& contentInfoTier);
111
112 MCAPI void serialize(::std::ostream& fileStream) const;
113
114 MCAPI bool supportsVibrantVisuals() const;
115#endif
116 // NOLINTEND
117
118public:
119 // static functions
120 // NOLINTBEGIN
121 MCAPI static void _populateDependencies(
122 ::std::vector<::PackInstance>& packStack,
123 ::PackInstance& packInstance,
124 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
125 bool isDependent
126 );
127
128 MCAPI static ::std::unique_ptr<::ResourcePackStack> deserialize(
129 ::std::istream& fileStream,
130 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
131 ::std::optional<::std::string> levelId
132 );
133
134#ifdef LL_PLAT_C
135 MCAPI static ::std::unique_ptr<::ResourcePackStack> deserialize(
136 ::std::vector<::PackInstanceId> const& ids,
137 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
138 ::std::optional<::std::string> levelId
139 );
140
141 MCAPI static ::std::vector<::PackInstanceId> deserialize(::std::istream& fileStream);
142#endif
143 // NOLINTEND
144
145public:
146 // constructor thunks
147 // NOLINTBEGIN
148 MCAPI void* $ctor();
149
150#ifdef LL_PLAT_C
151 MCAPI void* $ctor(
152 ::std::vector<::PackInstance> const& packs,
153 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo
154 );
155#endif
156
157 MCAPI void* $ctor(
158 ::std::vector<::PackInstanceId> const& identities,
159 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
160 bool anyVersion
161 );
162 // NOLINTEND
163
164public:
165 // destructor thunk
166 // NOLINTBEGIN
167 MCAPI void $dtor();
168 // NOLINTEND
169
170public:
171 // virtual function thunks
172 // NOLINTBEGIN
173 MCAPI ::std::vector<::LoadedResourceData> $loadAllVersionsOf(::ResourceLocation const& resourceLocation) const;
174
175 MCAPI bool
176 $loadAllVersionsOf(::ResourceLocation const& resourceLocation, ::ResourcePackMergeStrategy& mergeStrategy) const;
177
178 MCAPI bool $loadAllVersionsOf(
179 ::ResourceLocation const& resourceLocation,
180 ::brstd::function_ref<bool(::PackInstance const&)> packInstanceFilter,
181 ::ResourcePackMergeStrategy& mergeStrategy
182 ) const;
183
184
185 // NOLINTEND
186
187public:
188 // vftables
189 // NOLINTBEGIN
190 MCNAPI static void** $vftable();
191 // NOLINTEND
192};
Definition ContentIdentity.h:8
Definition ContentTierInfo.h:12
Definition IResourcePackRepository.h:34
Definition LoadedResourceData.h:5
Definition PackInstance.h:28
Definition PackSourceReport.h:11
Definition ResourceLocation.h:15
Definition ResourcePackMergeStrategy.h:10
static MCAPI void ** $vftable()
Definition function_ref.h:60
Definition PackIdVersion.h:10
Definition PackInstanceId.h:8
Definition serialize.h:11