LeviLamina
Loading...
Searching...
No Matches
ResourcePackStack.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/resource/PackType.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/platform/brstd/function_ref.h"
9
10// auto generated forward declare list
11// clang-format off
12class ContentIdentity;
15class PackInstance;
19struct PackInstanceId;
20// clang-format on
21
23public:
24 // ResourcePackStack inner types define
25 using PackInstanceStack = ::std::vector<::PackInstance>;
26
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 24, ::std::vector<::PackInstance>> mStack;
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSourceReport>> mPackSourceReport;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 // vIndex: 0
42 virtual ~ResourcePackStack();
43
44 // vIndex: 3
45 virtual ::std::vector<::LoadedResourceData> loadAllVersionsOf(::ResourceLocation const& resourceLocation) const;
46
47 // vIndex: 2
48 virtual bool
49 loadAllVersionsOf(::ResourceLocation const& resourceLocation, ::ResourcePackMergeStrategy& mergeStrategy) const;
50
51 // vIndex: 1
52 virtual bool loadAllVersionsOf(
53 ::ResourceLocation const& resourceLocation,
54 ::brstd::function_ref<bool(::PackInstance const&)> packInstanceFilter,
55 ::ResourcePackMergeStrategy& mergeStrategy
56 ) const;
57 // NOLINTEND
58
59public:
60 // member functions
61 // NOLINTBEGIN
63 ::std::vector<::PackInstanceId> const& identities,
64 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
65 bool anyVersion
66 );
67
68 MCAPI void _setLoadingReport(::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo);
69
70 MCAPI void
71 add(::PackInstance packInstance,
72 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
73 bool isDependent);
74
75 MCAPI ::std::vector<::std::string> getPackTelemetryNamesWithVersion(::PackType type) const;
76
77 MCAPI void getSplitStacks(::ResourcePackStack& clientStack, ::ResourcePackStack& serverStack) const;
78
79 MCAPI bool hasCapabilityInStack(::std::string_view capability) const;
80
81 MCAPI bool hasPlatformLockedContent() const;
82
83 MCAPI bool isAssetExtractionViableForAll(
84 ::std::function<::std::string(::ContentIdentity const&)> getContentKey,
85 ::std::string const& sourceContext
86 ) const;
87
88 MCAPI void removeIf(::std::function<bool(::PackInstance const&)> const& callback);
89
90 MCAPI void removeInvalidPacks();
91 // NOLINTEND
92
93public:
94 // static functions
95 // NOLINTBEGIN
96 MCAPI static void _populateDependencies(
97 ::std::vector<::PackInstance>& packStack,
98 ::PackInstance& packInstance,
99 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
100 bool isDependent
101 );
102
103 MCAPI static ::std::unique_ptr<::ResourcePackStack> deserialize(
104 ::std::istream& fileStream,
105 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
106 ::std::optional<::std::string> levelId
107 );
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCAPI void* $ctor(
114 ::std::vector<::PackInstanceId> const& identities,
115 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository const> const& repo,
116 bool anyVersion
117 );
118 // NOLINTEND
119
120public:
121 // destructor thunk
122 // NOLINTBEGIN
123 MCAPI void $dtor();
124 // NOLINTEND
125
126public:
127 // virtual function thunks
128 // NOLINTBEGIN
129 MCAPI ::std::vector<::LoadedResourceData> $loadAllVersionsOf(::ResourceLocation const& resourceLocation) const;
130
131 MCAPI bool
132 $loadAllVersionsOf(::ResourceLocation const& resourceLocation, ::ResourcePackMergeStrategy& mergeStrategy) const;
133
134 MCAPI bool $loadAllVersionsOf(
135 ::ResourceLocation const& resourceLocation,
136 ::brstd::function_ref<bool(::PackInstance const&)> packInstanceFilter,
137 ::ResourcePackMergeStrategy& mergeStrategy
138 ) const;
139 // NOLINTEND
140
141public:
142 // vftables
143 // NOLINTBEGIN
144 MCNAPI static void** $vftable();
145 // NOLINTEND
146};
Definition ContentIdentity.h:8
Definition IResourcePackRepository.h:34
Definition LoadedResourceData.h:5
Definition PackInstance.h:16
Definition PackSourceReport.h:5
Definition ResourceLocation.h:14
Definition ResourcePackMergeStrategy.h:10
Definition ResourcePackStack.h:22
static MCAPI void ** $vftable()
Definition function_ref.h:60
Definition PackInstanceId.h:8