Skip to content
LeviMC
English
AutoLightDark
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
9// auto generated forward declare list
10// clang-format off
11class ContentIdentity;
12class ContentTierInfo;
13class I18n;
15class PackInstance;
16class PackReport;
18struct PackIdVersion;
19struct PackInstanceId;
21// clang-format on
22
23class ResourcePackStack {
24public:
25 // ResourcePackStack inner types define
26 using PackInstanceStack = ::std::vector<::PackInstance>;
27
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 24, ::std::vector<::PackInstance>> mStack;
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSourceReport>> mPackSourceReport;
33 // NOLINTEND
34
35public:
36 LLAPI void
37 add(PackInstance packInstance,
38 Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
39 bool isDependent);
40
41public:
42 // prevent constructor by default
43 ResourcePackStack();
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 virtual ~ResourcePackStack();
49 // NOLINTEND
50
51public:
52 // member functions
53 // NOLINTBEGIN
54#ifdef LL_PLAT_C
55 MCNAPI ResourcePackStack(
56 ::std::vector<::PackInstance> const& packs,
57 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo
58 );
59#endif
60
61 MCAPI ResourcePackStack(
62 ::std::vector<::PackInstanceId> const& identities,
63 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
64 bool anyVersion
65 );
66
67#ifdef LL_PLAT_C
68 MCNAPI void _setLoadingReport(::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo);
69#endif
70
71#ifdef LL_PLAT_C
72 MCNAPI void ensureSupportedSubpacks(::ContentTierInfo const& contentInfoTier);
73#endif
74
75 MCNAPI ::std::vector<::std::string> getPackTelemetryNamesWithVersion(::I18n& loc, ::PackType type) const;
76
77 MCNAPI ::UnextractablePacks
78 getPacksWhereAssetExtractionNotViable(::std::function<::std::string(::ContentIdentity const&)> getContentKey) const;
79
80 MCAPI void getSplitStacks(::ResourcePackStack& clientStack, ::ResourcePackStack& serverStack) const;
81
82#ifdef LL_PLAT_C
83 MCNAPI ::std::vector<::PackInstanceId> getStackAsIdentities() const;
84
85 MCNAPI bool isOnStack(::PackIdVersion const& packIdentity) const;
86
87 MCNAPI void mergePackReports(::std::unordered_map<::PackInstanceId, ::PackReport>& packReports);
88
89 MCNAPI void serialize(::std::ostream& fileStream) const;
90
91 MCNAPI bool supportsVibrantVisuals() const;
92#endif
93 // NOLINTEND
94
95public:
96 // static functions
97 // NOLINTBEGIN
98 MCAPI static void _populateDependencies(
99 ::std::vector<::PackInstance>& packStack,
100 ::PackInstance& packInstance,
101 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
102 bool isDependent,
103 ::std::optional<::std::string> const& levelId
104 );
105
106 MCAPI static ::std::unique_ptr<::ResourcePackStack> deserialize(
107 ::std::string_view fileData,
108 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
109 ::std::optional<::std::string> levelId
110 );
111
112#ifdef LL_PLAT_C
113 MCNAPI static ::std::unique_ptr<::ResourcePackStack> deserialize(
114 ::std::vector<::PackInstanceId> const& ids,
115 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
116 ::std::optional<::std::string> levelId
117 );
118#endif
119 // NOLINTEND
120
121public:
122 // constructor thunks
123 // NOLINTBEGIN
124#ifdef LL_PLAT_C
125 MCNAPI void* $ctor(
126 ::std::vector<::PackInstance> const& packs,
127 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo
128 );
129#endif
130
131 MCAPI void* $ctor(
132 ::std::vector<::PackInstanceId> const& identities,
133 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
134 bool anyVersion
135 );
136 // NOLINTEND
137
138public:
139 // destructor thunk
140 // NOLINTBEGIN
141 MCNAPI void $dtor();
142 // NOLINTEND
143
144public:
145 // vftables
146 // NOLINTBEGIN
147 MCNAPI static void** $vftable();
148 // NOLINTEND
149};
Definition ContentIdentity.h:8
Definition ContentTierInfo.h:12
Definition I18n.h:19
Definition IResourcePackRepository.h:36
Definition PackInstance.h:16
Definition PackReport.h:17
Definition PackSourceReport.h:11
MCAPI ::std::vector<::std::string > getPackTelemetryNamesWithVersion(::I18n &loc, ::PackType type) const
MCAPI void $dtor()
MCAPI::UnextractablePacks getPacksWhereAssetExtractionNotViable(::std::function<::std::string(::ContentIdentity const &)> getContentKey) const
static MCAPI void ** $vftable()
Definition PackIdVersion.h:10
Definition PackInstanceId.h:8
Definition UnextractablePacks.h:5
Definition serialize.h:11