From 4d523b18e5b10c89535e94c8dc98d27deb28f5a2 Mon Sep 17 00:00:00 2001 From: Meredith Espinosa Date: Wed, 10 Jul 2019 14:56:57 -0700 Subject: [PATCH] update fabric, fix crash --- build.gradle | 8 ++++---- .../java/io/github/cottonmc/templates/util/SpriteSet.java | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 15cda38..1bb8eec 100755 --- a/build.gradle +++ b/build.gradle @@ -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" } diff --git a/src/main/java/io/github/cottonmc/templates/util/SpriteSet.java b/src/main/java/io/github/cottonmc/templates/util/SpriteSet.java index 47fdb65..eb492aa 100644 --- a/src/main/java/io/github/cottonmc/templates/util/SpriteSet.java +++ b/src/main/java/io/github/cottonmc/templates/util/SpriteSet.java @@ -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(); } }