LeviLamina
Loading...
Searching...
No Matches
PackInstance.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/screens/controllers/PackCategory.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/resource/PackOrigin.h"
9#include "mc/deps/core/resource/PackType.h"
10#include "mc/deps/core/resource/ResourceFileSystem.h"
11#include "mc/resources/PackIconType.h"
12#include "mc/resources/PackReport.h"
13#include "mc/resources/PackStats.h"
14
15// auto generated forward declare list
16// clang-format off
17class ContentTierInfo;
18class PackManifest;
19class PackSettings;
21class ResourcePack;
22class SemVersion;
23namespace Bedrock::Resources { class PreloadedPathHandle; }
24namespace Core { class Path; }
25namespace mce { class UUID; }
26// clang-format on
27
28class PackInstance {
29public:
30 // PackInstance inner types define
31 using Callback = ::std::function<void(::Core::Path const&)>;
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 248, ::PackReport> mPackReport;
37 ::ll::TypedStorage<8, 8, ::PackSettings*> mPackSettings;
38 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::ResourcePack>>> mPack;
39 ::ll::TypedStorage<4, 16, ::PackStats> mStats;
40 ::ll::TypedStorage<4, 4, int> mSubpackIndex;
41 ::ll::TypedStorage<1, 1, uchar> mRevision;
42 // NOLINTEND
43
44public:
45 // prevent constructor by default
46 PackInstance();
47
48public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI PackInstance(
52 ::gsl::not_null<::std::shared_ptr<::ResourcePack>> pack,
53 int subpackIndex,
54 bool packSettings,
56 );
57
58 MCAPI PackInstance(
59 ::gsl::not_null<::std::shared_ptr<::ResourcePack>> pack,
60 ::std::string const& subpackName,
61 bool packSettings,
63 );
64
65 MCAPI void
66 forEachIn(::Core::Path const& path, ::std::function<void(::Core::Path const&)> callback, bool recurseAnyways) const;
67
68#ifdef LL_PLAT_C
69 MCAPI void generateAssetSet();
70#endif
71
72 MCAPI uint getFileCount() const;
73
74 MCAPI ::std::string const& getFolderName() const;
75
76#ifdef LL_PLAT_C
77 MCAPI ::ResourceFileSystem getIconFileSytem() const;
78
79 MCAPI ::Core::PathBuffer<::std::string> getIconPath(::PackIconType iconType) const;
80
81 MCAPI ::Core::PathBuffer<::std::string> const& getIconZipPath() const;
82#endif
83
84 MCAPI double getLoadTime() const;
85
86 MCAPI ::PackManifest const& getManifest() const;
87
88 MCAPI ::PackCategory getPackCategory() const;
89
90 MCAPI ::mce::UUID const getPackId() const;
91
92 MCAPI ::PackOrigin getPackOrigin() const;
93
94 MCFOLD ::PackSettings const* getPackSettings() const;
95
96 MCFOLD ::PackStats const& getPackStats() const;
97
98 MCFOLD ::PackStats& getPackStats();
99
100 MCAPI ::Core::PathBuffer<::std::string> const& getRelativePathWithinZip() const;
101
102 MCAPI bool getResource(::Core::Path const& resourceName, ::std::string& resourceStream) const;
103
104 MCAPI ::ResourceLocation const& getResourceLocation() const;
105
106#ifdef LL_PLAT_C
107 MCAPI int getSubpackCount() const;
108#endif
109
110 MCAPI ::std::string const& getSubpackFolderName() const;
111
112#ifdef LL_PLAT_C
113 MCFOLD int getSubpackIndex() const;
114#endif
115
116 MCAPI ::ContentTierInfo getTierInfo() const;
117
118 MCAPI ::SemVersion const& getVersion() const;
119
120#ifdef LL_PLAT_C
121 MCAPI bool hasIcon(::PackIconType iconType) const;
122#endif
123
124 MCAPI bool hasResource(::Core::Path const& resourceName) const;
125
126 MCAPI bool isBaseGamePack() const;
127
128 MCAPI bool isSlicePack() const;
129
130 MCAPI bool isTrusted() const;
131
132#ifdef LL_PLAT_C
133 MCAPI bool isType(::PackType packType) const;
134#endif
135
136 MCAPI bool isZipped() const;
137
138 MCAPI ::Bedrock::Resources::PreloadedPathHandle preloadArchive(::Core::Path const& packRelativePath) const;
139
140 MCAPI ::std::vector<::Bedrock::Resources::PreloadedPathHandle>
141 preloadPath(::Core::Path const& packRelativePath) const;
142
143 MCAPI ~PackInstance();
144 // NOLINTEND
145
146public:
147 // constructor thunks
148 // NOLINTBEGIN
149 MCAPI void* $ctor(
150 ::gsl::not_null<::std::shared_ptr<::ResourcePack>> pack,
151 int subpackIndex,
152 bool packSettings,
154 );
155
156 MCAPI void* $ctor(
157 ::gsl::not_null<::std::shared_ptr<::ResourcePack>> pack,
158 ::std::string const& subpackName,
159 bool packSettings,
161 );
162 // NOLINTEND
163
164public:
165 // destructor thunk
166 // NOLINTBEGIN
167 MCAPI void $dtor();
168 // NOLINTEND
169};
Definition PreloadedPathHandle.h:16
Definition ContentTierInfo.h:12
Definition Path.h:12
Definition PackManifest.h:38
Definition PackSettings.h:19
Definition ResourceLocation.h:15
Definition ResourcePack.h:28
Definition SemVersion.h:15
Definition UUID.h:7