Fix crash when retrieving blockstate model

This commit is contained in:
embeddedt 2026-06-09 21:01:39 -04:00
parent 4a4ef3b2cd
commit e753953cba
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -121,7 +121,11 @@ public class DynamicModelSystem {
identifier = state.getBlock().builtInRegistryHolder().getKey().identifier();
}
var loadedModels = blockStateDefinitions.get(identifier);
return loadedModels.models().get(state);
if (loadedModels != null) {
return loadedModels.models().get(state);
} else {
return null;
}
}));
}