Fixed some nullability issues
This commit is contained in:
@@ -103,6 +103,7 @@ public class Blocks implements ContentList{
|
|||||||
alwaysReplace = true;
|
alwaysReplace = true;
|
||||||
hasShadow = false;
|
hasShadow = false;
|
||||||
useColor = false;
|
useColor = false;
|
||||||
|
wall = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void drawBase(Tile tile){}
|
@Override public void drawBase(Tile tile){}
|
||||||
|
|||||||
@@ -569,7 +569,9 @@ public class ContentParser{
|
|||||||
if(field.field.getType().isPrimitive()) return;
|
if(field.field.getType().isPrimitive()) return;
|
||||||
|
|
||||||
if(!field.field.isAnnotationPresent(Nullable.class) && field.field.get(object) == null && !implicitNullable.contains(field.field.getType())){
|
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){
|
}catch(Exception e){
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user