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