From 4786d32fc8fe069ba108512e6219d37fb5ab24aa Mon Sep 17 00:00:00 2001 From: tartaric_acid Date: Sat, 12 Oct 2024 01:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=A4=84=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E8=AF=BB=E5=8F=96=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../geckolib3/util/json/JsonAnimationUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/util/json/JsonAnimationUtils.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/util/json/JsonAnimationUtils.java index 470370ab2..7059e250f 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/util/json/JsonAnimationUtils.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/util/json/JsonAnimationUtils.java @@ -25,7 +25,10 @@ public class JsonAnimationUtils { private static Gson GSON = null; public static Set> getAnimations(JsonObject json) { - return json.getAsJsonObject("animations").entrySet(); + if (json.has("animations")) { + return json.getAsJsonObject("animations").entrySet(); + } + return ImmutableSet.of(); } public static List> getBones(JsonObject json) {