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