Merge branch 'master' into 1.15
This commit is contained in:
commit
e069e1485d
1 file changed
+4
-2
@@ -219,11 +219,13 @@ public class CarpetExpression
|
|||||||
Value v0 = params.get(0).evalValue(c);
|
Value v0 = params.get(0).evalValue(c);
|
||||||
if (v0 instanceof BlockValue)
|
if (v0 instanceof BlockValue)
|
||||||
{
|
{
|
||||||
Value retval = new StringValue(test.apply( ((BlockValue) v0).getBlockState(), ((BlockValue) v0).getPos()));
|
String strVal = test.apply( ((BlockValue) v0).getBlockState(), ((BlockValue) v0).getPos());
|
||||||
|
Value retval = strVal != null ? new StringValue(strVal) : Value.NULL;
|
||||||
return (c_, t_) -> retval;
|
return (c_, t_) -> retval;
|
||||||
}
|
}
|
||||||
BlockValue block = BlockValue.fromParams(cc, params, 0).block;
|
BlockValue block = BlockValue.fromParams(cc, params, 0).block;
|
||||||
Value retval = new StringValue(test.apply(block.getBlockState(), block.getPos()));
|
String strVal = test.apply(block.getBlockState(), block.getPos());
|
||||||
|
Value retval = strVal != null ? new StringValue(strVal) : Value.NULL;
|
||||||
return (c_, t_) -> retval;
|
return (c_, t_) -> retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user