summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/AssetManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/AssetManager.cpp b/src/AssetManager.cpp
index be69dd0..19cd452 100644
--- a/src/AssetManager.cpp
+++ b/src/AssetManager.cpp
@@ -613,16 +613,16 @@ BlockFaces &AssetManager::GetBlockModelByBlockId(BlockId block) {
return blockIdToBlockFaces.find(block)->second;
}
- auto blockStateName = TransformBlockIdToBlockStateName(block);
- AssetBlockState *asset = GetAsset<AssetBlockState>("/minecraft/blockstates/" + blockStateName.first);
+ BlockInfo blockInfo = GetBlockInfo(block);
+ AssetBlockState *asset = GetAsset<AssetBlockState>("/minecraft/blockstates/" + blockInfo.blockstate);
if (!asset)
return GetBlockModelByBlockId(BlockId{ 7788,0 });
BlockState &blockState = asset->blockState;
- if (blockState.variants.find(blockStateName.second) == blockState.variants.end())
+ if (blockState.variants.find(blockInfo.variant) == blockState.variants.end())
return GetBlockModelByBlockId(BlockId{ 7788,0 });
- BlockStateVariant &variant = blockState.variants[blockStateName.second];
+ BlockStateVariant &variant = blockState.variants[blockInfo.variant];
if (variant.models.empty())
return GetBlockModelByBlockId(BlockId{ 7788,0 });