add BlockModel struct
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user