3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/controls/renderers/UIThumbnailAtlasRenderer.h"
7#include "mc/client/gui/oreui/resources/AtlasIndex.h"
8#include "mc/deps/core/string/HashedString.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/game_refs/EnableGetWeakRef.h"
20namespace mce {
class Color; }
27 public ::std::enable_shared_from_this<::OreUI::UIBlockThumbnailAtlasManager> {
39 ::ll::TypedStorage<8, 48, ::HashedString> name;
40 ::ll::TypedStorage<2, 2, ushort> u;
41 ::ll::TypedStorage<2, 2, ushort> v;
42 ::ll::TypedStorage<2, 2, ushort> rows;
43 ::ll::TypedStorage<2, 2, ushort> cols;
44 ::ll::TypedStorage<2, 2, ushort> maxCols;
45 ::ll::TypedStorage<8, 8, uint64> count;
46 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::UIThumbnailAtlasRenderer::AtlasInfo>> mAtlasInfo;
47 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cg::ImageBuffer>> mImageBuffer;
57 MCAPI
explicit AtlasData(::HashedString name);
59 MCAPI AtlasData(::HashedString name, ::std::unique_ptr<::UIThumbnailAtlasRenderer::AtlasInfo>&& atlasInfo);
65 MCAPI
void* $ctor(::HashedString name);
67 MCAPI
void* $ctor(::HashedString name, ::std::unique_ptr<::UIThumbnailAtlasRenderer::AtlasInfo>&& atlasInfo);
71 using AtlasInfo = ::UIThumbnailAtlasRenderer::AtlasInfo;
73 using ItemAtlasInfo = ::std::pair<::UIThumbnailAtlasRenderer::AtlasInfo, ::OreUI::AtlasIndex::ItemEntry>;
75 using SubstitutionMap = ::std::unordered_map<::HashedString, ::HashedString>;
78 ::std::unordered_map<::HashedString, ::std::unique_ptr<::OreUI::UIBlockThumbnailAtlasManager::AtlasData>>;
83 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClientInstance;
84 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::HashedString>> mSubstitutions;
85 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::std::shared_ptr<::OreUI::AtlasIndex>>>
90 ::std::unordered_map<::HashedString, ::std::unique_ptr<::OreUI::UIBlockThumbnailAtlasManager::AtlasData>>>
92 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mAvailableSemaphore;
93 ::ll::TypedStorage<4, 4, uint> mAtlasIndex;
94 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::mce::Color>> mBlockAverageColorMap;
99 UIBlockThumbnailAtlasManager();
104 MCAPI UIBlockThumbnailAtlasManager(
105 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> primaryClientInstance,
106 ::std::unordered_map<::HashedString, ::HashedString> substitutionMap
109 MCAPI
bool _buildThumbnailAtlas(::TaskGroup& taskGroup,
bool isResume);
111 MCAPI
void _generateItemIndex(
bool stripVanillaNamespace);
113 MCAPI ::mce::TexturePtr _getAtlasTexture(::ItemStack
const& item, ::ItemGraphics
const& itemGraphics);
115 MCAPI ::OreUI::UIBlockThumbnailAtlasManager::AtlasData&
116 _getOrCreateAtlasData(::std::string_view atlasName, ::mce::TexturePtr
const& texturePtr);
118 MCAPI ::mce::TexturePtr _getShulkerBoxTexture(::ItemStack
const& item)
const;
120 MCAPI
void _unloadAtlasTextures();
122 MCAPI ~UIBlockThumbnailAtlasManager();
129 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> primaryClientInstance,
130 ::std::unordered_map<::HashedString, ::HashedString> substitutionMap
Definition IClientInstance.h:5
Definition ItemGraphics.h:5
Definition ItemStack.h:26
Definition UIBlockThumbnailAtlasManager.h:7
Definition TaskGroup.h:57
Definition ImageBuffer.h:16
Definition TexturePtr.h:19
Definition AtlasIndex.h:7
Definition UIBlockThumbnailAtlasManager.h:15