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;
51 using AtlasInfo = ::UIThumbnailAtlasRenderer::AtlasInfo;
53 using ItemAtlasInfo = ::std::pair<::UIThumbnailAtlasRenderer::AtlasInfo, ::OreUI::AtlasIndex::ItemEntry>;
55 using SubstitutionMap = ::std::unordered_map<::HashedString, ::HashedString>;
58 ::std::unordered_map<::HashedString, ::std::unique_ptr<::OreUI::UIBlockThumbnailAtlasManager::AtlasData>>;
63 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClientInstance;
64 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::HashedString>> mSubstitutions;
65 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::std::shared_ptr<::OreUI::AtlasIndex>>>
70 ::std::unordered_map<::HashedString, ::std::unique_ptr<::OreUI::UIBlockThumbnailAtlasManager::AtlasData>>>
72 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mAvailableSemaphore;
73 ::ll::TypedStorage<4, 4, uint> mAtlasIndex;
74 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::mce::Color>> mBlockAverageColorMap;
79 UIBlockThumbnailAtlasManager();
84 MCAPI UIBlockThumbnailAtlasManager(
85 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> primaryClientInstance,
86 ::std::unordered_map<::HashedString, ::HashedString> substitutionMap
89 MCAPI
bool _buildThumbnailAtlas(::TaskGroup& taskGroup,
bool isResume);
91 MCAPI ::mce::TexturePtr _getAtlasTexture(::ItemStack
const& item, ::ItemGraphics
const& itemGraphics);
93 MCAPI
void _unloadAtlasTextures();
95 MCAPI ::std::shared_ptr<::OreUI::AtlasIndex> getIndex(::std::string_view atlasName)
const;
97 MCAPI
bool isThumbnailAtlasEnabled()
const;
99 MCAPI
bool rebuildThumbnailAtlas(
bool isResume);
106 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> primaryClientInstance,
107 ::std::unordered_map<::HashedString, ::HashedString> substitutionMap
Definition IClientInstance.h:5
Definition ItemGraphics.h:5
Definition ItemStack.h:24
Definition UIBlockThumbnailAtlasManager.h:7
Definition TaskGroup.h:61
Definition ImageBuffer.h:16
Definition TexturePtr.h:7
Definition AtlasIndex.h:7
Definition UIBlockThumbnailAtlasManager.h:15