fix block model is not loading automatically
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user