Merge pull request #4 from AlexIIL/patch-1

Fix Templates blocking other custom models.
This commit is contained in:
Meredith Espinosa 2019-06-22 11:53:24 -07:00 committed by GitHub
commit 49e69227df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,7 @@ public class TemplateModelVariantProvider implements ModelVariantProvider {
@Override
public UnbakedModel loadModelVariant(ModelIdentifier modelId, ModelProviderContext context) throws ModelProviderException {
UnbakedModel variant = variants.get(modelId);
if (variant == null) throw new ModelProviderException("Couldn't find model for ID " + modelId);
return variant;
return variants.get(modelId);
}
public void registerTemplateModels(Block block, BlockState itemState, Function<BlockState, AbstractModel> model) {