From 1563ae5be6bc130a9b3a23464f7e28fdb1e87da3 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 May 2017 19:01:56 +0500 Subject: 2017-05-13 --- graphics/AssetManager.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'graphics/AssetManager.cpp') 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<