Skip to content

Commit 24ad65a

Browse files
committed
Allow the position to be null.
1 parent a4c37cf commit 24ad65a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/alexiil/mc/mod/load/json/subtypes/JsonRenderImage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected BakedRender actuallyBake(FunctionContext context) throws InvalidExpres
3535
NodeVariableDouble varWidth = context.putVariableDouble("elem_width");
3636
NodeVariableDouble varHeight = context.putVariableDouble("elem_height");
3737
INodeLong _colour = GenericExpressionCompiler.compileExpressionLong(colour, context);
38-
BakedArea pos = position.bake(context);
38+
BakedArea pos = (position == null ? new Area("0", "0", "screen_width", "screen_height") : position).bake(context);
3939
BakedArea tex;
4040
if (texture == null) {
4141
NodeConstantDouble zero = NodeConstantDouble.ZERO;

0 commit comments

Comments
 (0)