add BlockModel struct

This commit is contained in:
MihailRis
2025-04-27 18:21:56 +03:00
parent 718f5d1089
commit 20e3a961f9
12 changed files with 46 additions and 39 deletions
+3 -3
View File
@@ -35,10 +35,10 @@ void ContentGfxCache::refresh(const Block& def, const Atlas& atlas) {
sideregions[def.rt.id * 6 + side] = atlas.get(TEXTURE_NOTFOUND);
}
}
if (def.model == BlockModelType::CUSTOM) {
auto model = assets.require<model::Model>(def.modelName);
if (def.model.type == BlockModelType::CUSTOM) {
auto model = assets.require<model::Model>(def.model.name);
// temporary dirty fix tbh
if (def.modelName.find(':') == std::string::npos) {
if (def.model.name.find(':') == std::string::npos) {
for (auto& mesh : model.meshes) {
size_t pos = mesh.texture.find(':');
if (pos == std::string::npos) {