update fabric, fix crash

This commit is contained in:
Meredith Espinosa 2019-07-10 14:56:57 -07:00
parent 5446755e94
commit 4d523b18e5
2 changed files with 8 additions and 5 deletions

View File

@ -41,10 +41,10 @@ repositories {
}
dependencies {
minecraft "com.mojang:minecraft:1.14.2"
mappings "net.fabricmc:yarn:1.14.2+build.7"
modApi "net.fabricmc:fabric-loader:0.4.8+build.154"
modApi "net.fabricmc.fabric-api:fabric-api:0.3.0+build.185"
minecraft "com.mojang:minecraft:1.14.3"
mappings "net.fabricmc:yarn:1.14.3+build.7"
modApi "net.fabricmc:fabric-loader:0.4.8+build.155"
modApi "net.fabricmc.fabric-api:fabric-api:0.3.0+build.191"
implementation "com.google.code.findbugs:jsr305:3.0.2"
}

View File

@ -47,6 +47,9 @@ public class SpriteSet {
}
public boolean hasColor(Direction dir) {
return isDefault ? false : ObjectUtils.defaultIfNull(quads.get(dir).hasColor(), false);
if (isDefault) return false;
BakedQuad quad = quads.get(dir);
if (quad == null) return false;
return quad.hasColor();
}
}