LeviLamina
Loading...
Searching...
No Matches
ResourcePack.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/resource/PackOrigin.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10
11// auto generated forward declare list
12// clang-format off
13class Pack;
15class PackManifest;
16class PackReport;
20struct SubpackInfo;
21namespace Bedrock::Resources { class PreloadedPathHandle; }
22namespace Core { class Path; }
23// clang-format on
24
26public:
27 // ResourcePack inner types define
28 using Callback = ::std::function<void(::Core::Path const&)>;
29
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<1, 1, bool> mHidden;
34 ::ll::TypedStorage<1, 1, bool> mError;
35 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Pack>> mPack;
36 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackAccessStrategy>> mSubpackAccessStrategy;
37 ::ll::TypedStorage<8, 256, ::PackReport> mPackReport;
38 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::Pack>>> mSubPacks;
39 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::ResourcePack>>> mSubResourcePacks;
40 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mIconPath;
41 ::ll::TypedStorage<8, 8, double> mLoadTime;
42 ::ll::TypedStorage<1, 1, bool> mIsBaseGamePack;
43 ::ll::TypedStorage<1, 1, bool> mIsSlicePack;
44 ::ll::TypedStorage<8, 64, ::ResourceSignature> mResourceSignature;
45 ::ll::TypedStorage<1, 1, bool> mIsMarkedForRemoval;
46 // NOLINTEND
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 // vIndex: 0
52 virtual ~ResourcePack() /*override*/;
53 // NOLINTEND
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCAPI explicit ResourcePack(::Pack& pack);
59
60 MCAPI void _createSubpack(::SubpackInfo const& subpackInfo);
61
62 MCAPI void _createSubpacks();
63
64 MCAPI void _generateIconPath();
65
66 MCAPI bool areKnownFilesValid();
67
68 MCAPI void forEachIn(
69 ::Core::Path const& filePath,
70 ::std::function<void(::Core::Path const&)> callback,
71 int subpackIndex,
72 bool recurseAnyways
73 ) const;
74
75 MCAPI void
76 forEachInAssetSet(::Core::Path const& filePath, ::std::function<void(::Core::Path const&)> callback) const;
77
78 MCAPI void generateAssetSet();
79
80 MCAPI ::PackManifest& getManifest();
81
82 MCAPI ::PackOrigin getPackOrigin() const;
83
84 MCAPI bool getResource(::Core::Path const& resourceName, ::std::string& resourceStream, int subpackIndex) const;
85
86 MCAPI ::ResourceLocation const& getResourceLocation() const;
87
88 MCAPI ::SubpackInfoCollection const& getSubpackInfoStack() const;
89
90 MCAPI bool hasResource(::Core::Path const& resourceName, int subpackIndex) const;
91
92 MCAPI bool isAssetExtractionViable() const;
93
94 MCAPI bool isZipped() const;
95
96 MCAPI ::Bedrock::Resources::PreloadedPathHandle preloadPath(::Core::Path const& packRelativePath) const;
97
98 MCAPI void setLocale(::std::string const& code);
99
100 MCAPI void unregisterDeleteCallback(void* owner);
101 // NOLINTEND
102
103public:
104 // static variables
105 // NOLINTBEGIN
106 MCAPI static ::Core::PathBuffer<::std::string> const& RESOURCE_PACK_BUG_ICON_PATH();
107
108 MCAPI static ::Core::PathBuffer<::std::string> const& RESOURCE_PACK_ICON_PATH();
109
110 MCAPI static ::Core::PathBuffer<::std::string> const& TEXTURES_LIST_PATH();
111 // NOLINTEND
112
113public:
114 // constructor thunks
115 // NOLINTBEGIN
116 MCAPI void* $ctor(::Pack& pack);
117 // NOLINTEND
118
119public:
120 // destructor thunk
121 // NOLINTBEGIN
122 MCAPI void $dtor();
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
128 MCAPI static void** $vftable();
129 // NOLINTEND
130};
Definition EnableNonOwnerReferences.h:7
Definition Path.h:15
Definition PackAccessStrategy.h:20
Definition PackManifest.h:19
Definition PackReport.h:17
Definition Pack.h:26
Definition Path.h:16
Definition ResourceLocation.h:15
Definition ResourcePack.h:25
Definition ResourceSignature.h:14
Definition SubpackInfoCollection.h:5
Definition SubpackInfo.h:5
Definition code.h:5