notfound texture

This commit is contained in:
MihailRis 2023-11-22 15:18:11 +03:00
parent d92347097e
commit eb18269416
3 changed files with 3 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -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;

View File

@ -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");
}
}
}