summaryrefslogtreecommitdiffstats
path: root/graphics/AssetManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/AssetManager.cpp')
-rw-r--r--graphics/AssetManager.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/graphics/AssetManager.cpp b/graphics/AssetManager.cpp
index 62dac64..1840c63 100644
--- a/graphics/AssetManager.cpp
+++ b/graphics/AssetManager.cpp
@@ -73,6 +73,39 @@ std::string AssetManager::GetPathToAsset(std::string AssetName) {
assetTypeFileExtensions.at(instance().assets[AssetName].type);
}
+std::string AssetManager::GetAssetNameByBlockId(unsigned short id) {
+ std::string assetBase = "minecraft/textures/blocks/";
+ std::string textureName;
+ switch (id){
+ case 0:
+ textureName="air";
+ break;
+ case 1:
+ textureName="stone";
+ break;
+ case 2:
+ textureName="grass";
+ break;
+ case 3:
+ textureName="dirt";
+ break;
+ case 16:
+ textureName="coal_ore";
+ break;
+ case 17:
+ textureName="log_oak";
+ break;
+ case 31:
+ textureName="air";
+ break;
+ default:
+ //std::cout<<id<<std::endl;
+ textureName="beacon";
+ break;
+ }
+ return assetBase+textureName;
+}
+
bool Asset::isParsed() {
switch (type) {
case Unknown: