Skip to content

Commit 3fb6a34

Browse files
authored
Make query functions return type/data values of -1 for non-legacy blocks
This matches the new behaviour of the type/data variables in //generate
1 parent d5e8b50 commit 3fb6a34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Vector3 toWorldRel(double x, double y, double z) {
6060

6161
private int getLegacy(BlockVector3 position, int index) {
6262
final int[] legacy = LegacyMapper.getInstance().getLegacyFromBlock(extent.getBlock(position).toImmutableState());
63-
return legacy == null ? 0 : legacy[index];
63+
return legacy == null ? -1 : legacy[index];
6464
}
6565

6666
@Override

0 commit comments

Comments
 (0)