Update Upstream

f414af5 Fix the offset mask forcing negation of itself (1656)
This commit is contained in:
NotMyFault 2021-07-26 00:48:38 +02:00
parent aae5d037db
commit 92b4524dd6
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 4 additions and 8 deletions

View File

@ -6,8 +6,6 @@ import com.sk89q.worldedit.command.util.SuggestionHelper;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
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.OffsetMask;
import com.sk89q.worldedit.math.BlockVector3;
@ -45,8 +43,7 @@ public class RichOffsetMaskParser extends RichParser<Mask> {
int y = Integer.parseInt(arguments[1]);
int z = Integer.parseInt(arguments[2]);
Mask submask = worldEdit.getMaskFactory().parseFromInput(arguments[3], context);
OffsetMask offsetMask = new OffsetMask(submask, BlockVector3.at(x, y, z));
return new MaskIntersection(offsetMask, Masks.negate(submask));
return new OffsetMask(submask, BlockVector3.at(x, y, z));
}
}

View File

@ -24,8 +24,6 @@ import com.sk89q.worldedit.extension.input.InputParseException;
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.OffsetMask;
import com.sk89q.worldedit.internal.registry.InputParser;
import com.sk89q.worldedit.math.BlockVector3;
@ -63,8 +61,9 @@ public class OffsetMaskParser extends InputParser<Mask> {
} else {
submask = new ExistingBlockMask(context.requireExtent());
}
OffsetMask offsetMask = new OffsetMask(submask, BlockVector3.at(0, firstChar == '>' ? -1 : 1, 0));
return new MaskIntersection(offsetMask, Masks.negate(submask));
//FAWE start - OffsetMask > OffsetsMask
return new OffsetMask(submask, BlockVector3.at(0, firstChar == '>' ? -1 : 1, 0));
//FAWE end
}
}