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/resources/PackReport.h"
8#include "mc/resources/ResourceSignature.h"
9
10// auto generated forward declare list
11// clang-format off
12class Pack;
14struct SubpackInfo;
15namespace Bedrock::Resources { class PreloadedPathHandle; }
16namespace Core { class Path; }
17// clang-format on
18
20public:
21 // ResourcePack inner types define
22 using Callback = ::std::function<void(::Core::Path const&)>;
23
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<1, 1, bool> mHidden;
28 ::ll::TypedStorage<1, 1, bool> mError;
29 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::Pack>>> mPack;
30 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackAccessStrategy>> mSubpackAccessStrategy;
31 ::ll::TypedStorage<8, 248, ::PackReport> mPackReport;
32 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::Pack>>> mSubPacks;
33 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::ResourcePack>>> mSubResourcePacks;
34 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mIconPath;
35 ::ll::TypedStorage<8, 8, double> mLoadTime;
36 ::ll::TypedStorage<1, 1, bool> mIsBaseGamePack;
37 ::ll::TypedStorage<1, 1, bool> mIsSlicePack;
38 ::ll::TypedStorage<8, 64, ::ResourceSignature> mResourceSignature;
39 ::ll::TypedStorage<1, 1, bool> mIsMarkedForRemoval;
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
45
46public:
47 // member functions
48 // NOLINTBEGIN
49 MCAPI explicit ResourcePack(::gsl::not_null<::std::shared_ptr<::Pack>> pack);
50
51 MCAPI void _createSubpack(::SubpackInfo const& subpackInfo);
52
53 MCAPI void _createSubpacks();
54
55 MCAPI void _generateIconPath();
56
57 MCAPI bool _supportsPreload() const;
58
59 MCAPI bool areKnownFilesValid();
60
61 MCAPI void forEachIn(
62 ::Core::Path const& filePath,
63 ::std::function<void(::Core::Path const&)> callback,
64 int subpackIndex,
65 bool recurseAnyways
66 ) const;
67
68 MCAPI void generateAssetSet();
69
70 MCAPI bool getResource(::Core::Path const& resourceName, ::std::string& resourceStream, int subpackIndex) const;
71
72 MCAPI bool hasResource(::Core::Path const& resourceName, int subpackIndex) const;
73
74 MCAPI bool isAssetExtractionViable() const;
75
76 MCAPI ::std::vector<::Bedrock::Resources::PreloadedPathHandle>
77 preloadPath(::Core::Path const& packRelativePath, int subpackIndex, bool) const;
78
79 MCAPI void setLocale(::std::string const& code);
80
81 MCAPI ~ResourcePack();
82 // NOLINTEND
83
84public:
85 // static variables
86 // NOLINTBEGIN
87 MCAPI static ::Core::PathBuffer<::std::string> const& RESOURCE_PACK_BUG_ICON_PATH();
88
89 MCAPI static ::Core::PathBuffer<::std::string> const& RESOURCE_PACK_ICON_PATH();
90
91 MCAPI static ::Core::PathBuffer<::std::string> const& TEXTURES_LIST_PATH();
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCAPI void* $ctor(::gsl::not_null<::std::shared_ptr<::Pack>> pack);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105};
Definition Path.h:11
Definition PackAccessStrategy.h:20
Definition Pack.h:27
Definition Path.h:16
Definition ResourcePack.h:19
Definition SubpackInfo.h:5
Definition code.h:5