diff --git a/src/assets/assets_util.cpp b/src/assets/assets_util.cpp index bdd7795a..a2c68363 100644 --- a/src/assets/assets_util.cpp +++ b/src/assets/assets_util.cpp @@ -13,6 +13,9 @@ util::TextureRegion util::get_texture_region( } else { auto atlas = assets.get(name.substr(0, sep)); if (atlas) { + if (sep == name.length() - 1) { + return {atlas->getTexture(), UVRegion(0,0,1,1)}; + } if (auto reg = atlas->getIf(name.substr(sep+1))) { return {atlas->getTexture(), *reg}; } else if (!fallback.empty()){ diff --git a/src/content/ContentLoader.cpp b/src/content/ContentLoader.cpp index b2457cf4..9b14bc86 100644 --- a/src/content/ContentLoader.cpp +++ b/src/content/ContentLoader.cpp @@ -269,12 +269,6 @@ void ContentLoader::loadBlock( } else if (def.modelName.empty()) { throw std::runtime_error(name + ": no 'model-primitives' or 'model-name' found"); } - for (uint i = 0; i < 6; i++) { - std::string& texture = def.textureFaces[i]; - if (texture == TEXTURE_NOTFOUND) { - texture = ""; - } - } } def.model = *model; } else if (!modelTypeName.empty()) { diff --git a/src/graphics/render/ModelsGenerator.cpp b/src/graphics/render/ModelsGenerator.cpp index 30b6a7aa..c854b75a 100644 --- a/src/graphics/render/ModelsGenerator.cpp +++ b/src/graphics/render/ModelsGenerator.cpp @@ -57,7 +57,7 @@ model::Model ModelsGenerator::fromCustom( ) { auto model = model::Model(); for (size_t i = 0; i < modelBoxes.size(); i++) { - auto& mesh = model.addMesh("blocks:" + modelTextures[i * 6]); + auto& mesh = model.addMesh("blocks:"); mesh.lighting = lighting; const UVRegion boxtexfaces[6] = { get_region_for(modelTextures[i * 6 + 5], assets),