update loom, make loadModelVariant throw properly

This commit is contained in:
Meredith Espinosa 2019-06-19 18:19:11 -07:00
parent dd8c0a3d28
commit b53bf856e6
2 changed files with 7 additions and 7 deletions

View File

@ -7,7 +7,7 @@ buildscript {
}
}
dependencies {
classpath "net.fabricmc:fabric-loom:0.2.3-SNAPSHOT"
classpath "net.fabricmc:fabric-loom:0.2.4-SNAPSHOT"
}
}
@ -30,7 +30,7 @@ if(rootProject.file('private.gradle').exists()) { //Publishing details
archivesBaseName = "templates"
group = "io.github.cottonmc"
version = "1.0.0+1.14.2"
version = "1.0.1+1.14.2"
minecraft {
refmapName = 'mixins.templates.refmap.json'
@ -43,12 +43,10 @@ repositories {
dependencies {
minecraft "com.mojang:minecraft:1.14.2"
mappings "net.fabricmc:yarn:1.14.2+build.7"
modCompile "net.fabricmc:fabric-loader:0.4.8+build.154"
modCompile "net.fabricmc.fabric-api:fabric-api:0.3.0+build.185"
modApi "net.fabricmc:fabric-loader:0.4.8+build.154"
modApi "net.fabricmc.fabric-api:fabric-api:0.3.0+build.185"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "blue.endless:jankson:1.1.2"
}
processResources {

View File

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