mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
upstream changes
This commit is contained in:
@ -78,6 +78,6 @@ public class BiomeMaskParser extends InputParser<Mask> {
|
||||
biomes.add(biome);
|
||||
}
|
||||
|
||||
return Masks.asMask(new BiomeMask2D(new RequestExtent(), biomes));
|
||||
return Masks.asMask(new BiomeMask2D(context.getExtent(), biomes));
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class BlockCategoryMaskParser extends InputParser<Mask> {
|
||||
if (category == null) {
|
||||
throw new InputParseException("Unrecognised tag '" + input.substring(2) + '\'');
|
||||
} else {
|
||||
return new BlockCategoryMask(new RequestExtent(), category);
|
||||
return new BlockCategoryMask(context.getExtent(), category);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class BlockStateMaskParser extends InputParser<Mask> {
|
||||
boolean strict = input.charAt(1) == '=';
|
||||
String states = input.substring(2 + (strict ? 1 : 0), input.length() - 1);
|
||||
try {
|
||||
return new BlockStateMask(new RequestExtent(),
|
||||
return new BlockStateMask(context.getExtent(),
|
||||
Splitter.on(',').omitEmptyStrings().trimResults().withKeyValueSeparator('=').split(states),
|
||||
strict);
|
||||
} catch (Exception e) {
|
||||
|
@ -56,7 +56,7 @@ public class BlocksMaskParser extends InputParser<Mask> {
|
||||
if (holders.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return new BlockMask(new RequestExtent(), holders);
|
||||
return new BlockMask(context.getExtent(), holders);
|
||||
} catch (NoMatchException e) {
|
||||
return null;
|
||||
}
|
||||
|
@ -44,6 +44,6 @@ public class ExistingMaskParser extends SimpleInputParser<Mask> {
|
||||
|
||||
@Override
|
||||
public Mask parseFromSimpleInput(String input, ParserContext context) {
|
||||
return new ExistingBlockMask(new RequestExtent());
|
||||
return new ExistingBlockMask(context.getExtent());
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class ExpressionMaskParser extends InputParser<Mask> {
|
||||
try {
|
||||
Expression exp = Expression.compile(input.substring(1), "x", "y", "z");
|
||||
WorldEditExpressionEnvironment env = new WorldEditExpressionEnvironment(
|
||||
new RequestExtent(), Vector3.ONE, Vector3.ZERO);
|
||||
context.getExtent(), Vector3.ONE, Vector3.ZERO);
|
||||
exp.setEnvironment(env);
|
||||
if (context.getActor() != null) {
|
||||
SessionOwner owner = context.getActor();
|
||||
|
@ -62,7 +62,7 @@ public class OffsetMaskParser extends InputParser<Mask> {
|
||||
if (input.length() > 1) {
|
||||
submask = worldEdit.getMaskFactory().parseFromInput(input.substring(1), context);
|
||||
} else {
|
||||
submask = new ExistingBlockMask(new RequestExtent());
|
||||
submask = new ExistingBlockMask(context.getExtent());
|
||||
}
|
||||
OffsetMask offsetMask = new OffsetMask(submask, BlockVector3.at(0, firstChar == '>' ? -1 : 1, 0));
|
||||
return new MaskIntersection(offsetMask, Masks.negate(submask));
|
||||
|
@ -44,6 +44,6 @@ public class SolidMaskParser extends SimpleInputParser<Mask> {
|
||||
|
||||
@Override
|
||||
public Mask parseFromSimpleInput(String input, ParserContext context) {
|
||||
return new SolidBlockMask(new RequestExtent());
|
||||
return new SolidBlockMask(context.getExtent());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user