Fix the offset mask forcing negation of itself (#1656)

This commit is contained in:
Matthew Miller 2021-01-31 13:01:31 +10:00 committed by Octavia Togami
parent cfd209824c
commit f414af50f6
No known key found for this signature in database
GPG Key ID: CC364524D1983C99

View File

@ -24,8 +24,6 @@
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.function.mask.ExistingBlockMask;
import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.function.mask.MaskIntersection;
import com.sk89q.worldedit.function.mask.Masks;
import com.sk89q.worldedit.function.mask.OffsetsMask;
import com.sk89q.worldedit.internal.registry.InputParser;
import com.sk89q.worldedit.math.BlockVector3;
@ -63,7 +61,6 @@ public Mask parseFromInput(String input, ParserContext context) throws InputPars
} else {
submask = new ExistingBlockMask(context.requireExtent());
}
Mask offsetMask = OffsetsMask.single(submask, BlockVector3.at(0, firstChar == '>' ? -1 : 1, 0));
return new MaskIntersection(offsetMask, Masks.negate(submask));
return OffsetsMask.single(submask, BlockVector3.at(0, firstChar == '>' ? -1 : 1, 0));
}
}