Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
chore: unnecessary Extent in RegionMaskingFilter
Dieser Commit ist enthalten in:
Ursprung
7427665c29
Commit
6d01a013c6
@ -206,7 +206,7 @@ public class BiomeCommands {
|
|||||||
|
|
||||||
RegionFunction replace = new BiomeReplace(editSession, target);
|
RegionFunction replace = new BiomeReplace(editSession, target);
|
||||||
if (mask != null) {
|
if (mask != null) {
|
||||||
replace = new RegionMaskingFilter(editSession, mask, replace);
|
replace = new RegionMaskingFilter(mask, replace);
|
||||||
}
|
}
|
||||||
RegionVisitor visitor = new RegionVisitor(region, replace);
|
RegionVisitor visitor = new RegionVisitor(region, replace);
|
||||||
Operations.completeLegacy(visitor);
|
Operations.completeLegacy(visitor);
|
||||||
|
@ -818,7 +818,7 @@ public interface Extent extends InputExtent, OutputExtent {
|
|||||||
checkNotNull(pattern);
|
checkNotNull(pattern);
|
||||||
|
|
||||||
BlockReplace replace = new BlockReplace(this, pattern);
|
BlockReplace replace = new BlockReplace(this, pattern);
|
||||||
RegionMaskingFilter filter = new RegionMaskingFilter(this, mask, replace);
|
RegionMaskingFilter filter = new RegionMaskingFilter(mask, replace);
|
||||||
//FAWE start > add extent to RegionVisitor to allow chunk preloading
|
//FAWE start > add extent to RegionVisitor to allow chunk preloading
|
||||||
RegionVisitor visitor = new RegionVisitor(region, filter, this);
|
RegionVisitor visitor = new RegionVisitor(region, filter, this);
|
||||||
//FAWE end
|
//FAWE end
|
||||||
|
@ -35,9 +35,19 @@ public class RegionMaskingFilter implements RegionFunction {
|
|||||||
|
|
||||||
private final RegionFunction function;
|
private final RegionFunction function;
|
||||||
private final Mask mask;
|
private final Mask mask;
|
||||||
//FAWE start
|
|
||||||
private final Extent extent;
|
/**
|
||||||
//FAWE end
|
* Create a new masking filter.
|
||||||
|
*
|
||||||
|
* @param mask the mask
|
||||||
|
* @param function the function
|
||||||
|
*/
|
||||||
|
public RegionMaskingFilter(Mask mask, RegionFunction function) {
|
||||||
|
checkNotNull(function);
|
||||||
|
checkNotNull(mask);
|
||||||
|
this.mask = mask;
|
||||||
|
this.function = function;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new masking filter.
|
* Create a new masking filter.
|
||||||
@ -46,16 +56,11 @@ public class RegionMaskingFilter implements RegionFunction {
|
|||||||
* @param function the function
|
* @param function the function
|
||||||
*/
|
*/
|
||||||
//FAWE start - Extent
|
//FAWE start - Extent
|
||||||
public RegionMaskingFilter(Extent extent, Mask mask, RegionFunction function) {
|
@Deprecated(since = "TODO")
|
||||||
checkNotNull(function);
|
public RegionMaskingFilter(@SuppressWarnings("unused") Extent extent, Mask mask, RegionFunction function) {
|
||||||
checkNotNull(mask);
|
this(mask, function);
|
||||||
//FAWE start
|
|
||||||
checkNotNull(extent);
|
|
||||||
this.extent = extent;
|
|
||||||
//FAWE end
|
|
||||||
this.mask = mask;
|
|
||||||
this.function = function;
|
|
||||||
}
|
}
|
||||||
|
//FAWE end - Extent
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(BlockVector3 position) throws WorldEditException {
|
public boolean apply(BlockVector3 position) throws WorldEditException {
|
||||||
|
@ -330,7 +330,7 @@ public class ForwardExtentCopy implements Operation {
|
|||||||
}
|
}
|
||||||
if (sourceMask != Masks.alwaysTrue()) {
|
if (sourceMask != Masks.alwaysTrue()) {
|
||||||
new MaskTraverser(sourceMask).reset(transExt);
|
new MaskTraverser(sourceMask).reset(transExt);
|
||||||
copy = new RegionMaskingFilter(source, sourceMask, copy);
|
copy = new RegionMaskingFilter(sourceMask, copy);
|
||||||
}
|
}
|
||||||
if (copyingBiomes && (source.isWorld() || region instanceof FlatRegion)) {
|
if (copyingBiomes && (source.isWorld() || region instanceof FlatRegion)) {
|
||||||
copy = CombinedRegionFunction.combine(copy, new BiomeCopy(source, finalDest));
|
copy = CombinedRegionFunction.combine(copy, new BiomeCopy(source, finalDest));
|
||||||
@ -394,7 +394,7 @@ public class ForwardExtentCopy implements Operation {
|
|||||||
if (maskFunc != null) {
|
if (maskFunc != null) {
|
||||||
copy = new RegionMaskTestFunction(sourceMask, copy, maskFunc);
|
copy = new RegionMaskTestFunction(sourceMask, copy, maskFunc);
|
||||||
} else {
|
} else {
|
||||||
copy = new RegionMaskingFilter(source, sourceMask, copy);
|
copy = new RegionMaskingFilter(sourceMask, copy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (copyingBiomes && (source.isWorld() || region instanceof FlatRegion)) {
|
if (copyingBiomes && (source.isWorld() || region instanceof FlatRegion)) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren