diff --git a/res/textures/blocks/notfound.png b/res/textures/blocks/notfound.png new file mode 100644 index 00000000..d1e2db57 Binary files /dev/null and b/res/textures/blocks/notfound.png differ diff --git a/src/definitions.cpp b/src/definitions.cpp index 3b810ea8..ee7023c1 100644 --- a/src/definitions.cpp +++ b/src/definitions.cpp @@ -8,7 +8,6 @@ // All in-game definitions (blocks, items, etc..) void setup_definitions(ContentBuilder* builder) { - // TODO: automatic atlas generation instead of using texture indices Block* block = new Block("core:air", "air"); block->drawGroup = 1; block->lightPassing = true; diff --git a/src/frontend/ContentGfxCache.cpp b/src/frontend/ContentGfxCache.cpp index 2cf1affe..3e425510 100644 --- a/src/frontend/ContentGfxCache.cpp +++ b/src/frontend/ContentGfxCache.cpp @@ -20,6 +20,9 @@ ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets) { string tex = def->textureFaces[side]; if (atlas->has(tex)) { sideregions[i * 6 + side] = atlas->get(tex); + } else { + if (atlas->has("notfound")) + sideregions[i * 6 + side] = atlas->get("notfound"); } } }