From a6307039b0c7693f357db50c1558ed123965370d Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 25 Oct 2020 12:35:48 -0400 Subject: [PATCH] Fixed some nullability issues --- core/src/mindustry/content/Blocks.java | 1 + core/src/mindustry/mod/ContentParser.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 1d43e1d94b..3599e4e8b2 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -103,6 +103,7 @@ public class Blocks implements ContentList{ alwaysReplace = true; hasShadow = false; useColor = false; + wall = this; } @Override public void drawBase(Tile tile){} diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 0d88d01034..4fdf9a34b0 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -569,7 +569,9 @@ public class ContentParser{ if(field.field.getType().isPrimitive()) return; if(!field.field.isAnnotationPresent(Nullable.class) && field.field.get(object) == null && !implicitNullable.contains(field.field.getType())){ - throw new RuntimeException("'" + field.field.getName() + "' in " + object.getClass().getSimpleName() + " is missing!"); + throw new RuntimeException("'" + field.field.getName() + "' in " + + ((object.getClass().isAnonymousClass() ? object.getClass().getSuperclass() : object.getClass()).getSimpleName()) + + " is missing! Object = " + object + ", field = (" + field.field.getName() + " = " + field.field.get(object) + ")"); } }catch(Exception e){ throw new RuntimeException(e);