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#include "mc/resources/PackReport.h"
11#include "mc/resources/ResourceSignature.h"
12
13// auto generated forward declare list
14// clang-format off
15class Pack;
17class PackManifest;
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, 248, ::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 // prevent constructor by default
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 // vIndex: 0
56 virtual ~ResourcePack() /*override*/;
57 // NOLINTEND
58
59public:
60 // member functions
61 // NOLINTBEGIN
62 MCAPI explicit ResourcePack(::Pack& pack);
63
64 MCAPI void _createSubpack(::SubpackInfo const& subpackInfo);
65
66 MCAPI void _createSubpacks();
67
68 MCAPI void _generateIconPath();
69
70 MCAPI bool areKnownFilesValid();
71
72 MCAPI void forEachIn(
73 ::Core::Path const& filePath,
74 ::std::function<void(::Core::Path const&)> callback,
75 int subpackIndex,
76 bool recurseAnyways
77 ) const;
78
79 MCAPI void
80 forEachInAssetSet(::Core::Path const& filePath, ::std::function<void(::Core::Path const&)> callback) const;
81
82 MCAPI void generateAssetSet();
83
84 MCAPI ::PackManifest const& getManifest() const;
85
86 MCAPI ::PackOrigin getPackOrigin() const;
87
88 MCAPI bool getResource(::Core::Path const& resourceName, ::std::string& resourceStream, int subpackIndex) const;
89
90 MCAPI ::ResourceLocation const& getResourceLocation() const;
91
92 MCAPI ::SubpackInfoCollection const& getSubpackInfoStack() const;
93
94 MCAPI bool hasResource(::Core::Path const& resourceName, int subpackIndex) const;
95
96 MCAPI bool isAssetExtractionViable() const;
97
98 MCAPI bool isZipped() const;
99
100 MCAPI ::Bedrock::Resources::PreloadedPathHandle preloadPath(::Core::Path const& packRelativePath) const;
101
102 MCAPI void setLocale(::std::string const& code);
103
104 MCAPI void unregisterDeleteCallback(void* owner);
105 // NOLINTEND
106
107public:
108 // static variables
109 // NOLINTBEGIN
110 MCAPI static ::Core::PathBuffer<::std::string> const& RESOURCE_PACK_BUG_ICON_PATH();
111
112 MCAPI static ::Core::PathBuffer<::std::string> const& RESOURCE_PACK_ICON_PATH();
113
114 MCAPI static ::Core::PathBuffer<::std::string> const& TEXTURES_LIST_PATH();
115 // NOLINTEND
116
117public:
118 // constructor thunks
119 // NOLINTBEGIN
120 MCAPI void* $ctor(::Pack& pack);
121 // NOLINTEND
122
123public:
124 // destructor thunk
125 // NOLINTBEGIN
126 MCAPI void $dtor();
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCNAPI static void** $vftable();
133 // NOLINTEND
134};
Definition EnableNonOwnerReferences.h:7
Definition Path.h:17
Definition PackAccessStrategy.h:20
Definition PackManifest.h:31
Definition Pack.h:28
Definition Path.h:16
Definition ResourceLocation.h:14
Definition ResourcePack.h:25
static MCAPI void ** $vftable()
Definition SubpackInfoCollection.h:5
Definition SubpackInfo.h:5
Definition code.h:5