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