Fix offset mask (< and >)

This commit is contained in:
dordsor21 2020-05-07 19:38:42 +01:00
parent 8b1a0bbc34
commit a2b0a5e622

View File

@ -88,7 +88,11 @@ public class OffsetMask extends AbstractMask {
@Override
public boolean test(Extent extent, BlockVector3 pos) {
return getMask().test(extent, pos);
BlockVector3 testPos = pos.add(offset);
if (testPos.getBlockY() < 0 || testPos.getBlockY() > 255) {
return false;
}
return getMask().test(extent, pos.add(offset));
}
@Nullable