mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
fix block model is not loading automatically
This commit is contained in:
parent
86b5f5d82b
commit
04c25ef214
2 changed files with 9 additions and 2 deletions
|
|
@ -235,6 +235,15 @@ void AssetsLoader::addDefaults(AssetsLoader& loader, const Content* content) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (const auto& [_, def] : content->blocks.getDefs()) {
|
||||||
|
if (def->modelName.find(':') == std::string::npos) {
|
||||||
|
loader.add(
|
||||||
|
AssetType::MODEL,
|
||||||
|
MODELS_FOLDER + "/" + def->modelName,
|
||||||
|
def->modelName
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (const auto& [_, def] : content->items.getDefs()) {
|
for (const auto& [_, def] : content->items.getDefs()) {
|
||||||
if (def->modelName.find(':') == std::string::npos) {
|
if (def->modelName.find(':') == std::string::npos) {
|
||||||
loader.add(
|
loader.add(
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@
|
||||||
#include "maths/UVRegion.hpp"
|
#include "maths/UVRegion.hpp"
|
||||||
#include "voxels/Block.hpp"
|
#include "voxels/Block.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets)
|
ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets)
|
||||||
: content(content) {
|
: content(content) {
|
||||||
auto indices = content->getIndices();
|
auto indices = content->getIndices();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue