3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-19 09:20:08 +01:00

Refactor: getVersionMin/MaxY -> versionMin/MaxY

Dieser Commit ist enthalten in:
dordsor21 2021-12-29 16:44:41 +00:00
Ursprung f505828af1
Commit 9e8f0e7325
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
15 geänderte Dateien mit 30 neuen und 30 gelöschten Zeilen

Datei anzeigen

@ -281,12 +281,12 @@ public class BukkitServerInterface extends AbstractPlatform implements MultiUser
}
@Override
public int getVersionMinY() {
public int versionMinY() {
return new MinecraftVersion().isEqualOrHigherThan(MinecraftVersion.CAVES_18) ? -64 : 0;
}
@Override
public int getVersionMaxY() {
public int versionMaxY() {
return new MinecraftVersion().isEqualOrHigherThan(MinecraftVersion.CAVES_18) ? 319 : 255;
}
//FAWE end

Datei anzeigen

@ -171,12 +171,12 @@ class CLIPlatform extends AbstractPlatform {
}
@Override
public int getVersionMinY() {
public int versionMinY() {
return dataVersion >= Constants.DATA_VERSION_MC_1_18 ? -64 : 0;
}
@Override
public int getVersionMaxY() {
public int versionMaxY() {
return dataVersion >= Constants.DATA_VERSION_MC_1_18 ? 319 : 255;
}

Datei anzeigen

@ -31,8 +31,8 @@ public class RegionWrapper extends CuboidRegion {
public RegionWrapper(final int minX, final int maxX, final int minZ, final int maxZ) {
this(minX,
maxX,
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(),
minZ,
maxZ
);

Datei anzeigen

@ -305,8 +305,8 @@ public class ParserContext {
minY = extent.getMinY();
maxY = extent.getMaxY();
} else {
minY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY();
maxY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY();
minY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY();
maxY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY();
}
return minY;

Datei anzeigen

@ -240,11 +240,11 @@ public interface Platform extends Keyed {
/**
* Get the default minimum Y value of worlds based on Minecraft version (inclusive).
*/
int getVersionMinY();
int versionMinY();
/**
* Get the default maximum Y value of worlds based on Minecraft version (inclusive).
*/
int getVersionMaxY();
int versionMaxY();
//FAWE end
}

Datei anzeigen

@ -97,8 +97,8 @@ public interface OutputExtent {
@Deprecated
default boolean setBiome(BlockVector2 position, BiomeType biome) {
boolean result = false;
int minY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY();
int maxY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY();
int minY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY();
int maxY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY();
for (int y = minY; y < maxY; y++) {
result |= setBiome(position.toBlockVector3().mutY(y), biome);
}

Datei anzeigen

@ -50,8 +50,8 @@ public class OffsetMask extends AbstractMask {
@Deprecated
public OffsetMask(Mask mask, BlockVector3 offset) {
this(mask, offset,
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY()
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY()
);
}

Datei anzeigen

@ -113,8 +113,8 @@ public abstract class BreadthFirstSearch implements Operation {
public BreadthFirstSearch(RegionFunction function) {
//FAWE start - int depth, min/max y
this(function, Integer.MAX_VALUE,
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), null
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(), null
);
}

Datei anzeigen

@ -51,8 +51,8 @@ public class DownwardVisitor extends RecursiveVisitor {
public DownwardVisitor(Mask mask, RegionFunction function, int baseY) {
//FAWE start - int depth, min/max y
this(mask, function, baseY, Integer.MAX_VALUE, WorldEdit
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), null
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(), null
);
//FAWE end
}

Datei anzeigen

@ -42,8 +42,8 @@ public class NonRisingVisitor extends RecursiveVisitor {
public NonRisingVisitor(Mask mask, RegionFunction function) {
//FAWE start - int depth, y min/max
this(mask, function, Integer.MAX_VALUE, WorldEdit
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), null
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(), null
);
//FAWE end
}

Datei anzeigen

@ -44,8 +44,8 @@ public class RecursiveVisitor extends BreadthFirstSearch {
*/
public RecursiveVisitor(Mask mask, RegionFunction function) {
this(mask, function, Integer.MAX_VALUE, WorldEdit
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), null
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(), null
);
//FAWE end
}

Datei anzeigen

@ -228,7 +228,7 @@ public abstract class AbstractRegion extends AbstractSet<BlockVector3> implement
.getInstance()
.getPlatformManager()
.queryCapability(Capability.WORLD_EDITING)
.getVersionMinY() : world.getMinY();
.versionMinY() : world.getMinY();
//FAWE end
}
@ -238,7 +238,7 @@ public abstract class AbstractRegion extends AbstractSet<BlockVector3> implement
.getInstance()
.getPlatformManager()
.queryCapability(Capability.WORLD_EDITING)
.getVersionMaxY() : world.getMaxY();
.versionMaxY() : world.getMaxY();
//FAWE end
}

Datei anzeigen

@ -234,12 +234,12 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
.getPlatformManager()
.queryCapability(
Capability.WORLD_EDITING)
.getVersionMinY()
.versionMinY()
&& pos2.getBlockY() >= WorldEdit
.getInstance()
.getPlatformManager()
.queryCapability(Capability.WORLD_EDITING)
.getVersionMaxY();
.versionMaxY();
}
default int getMinimumY() {

Datei anzeigen

@ -68,12 +68,12 @@ public abstract class AbstractWorld implements World {
@Override
public int getMinY() {
return WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY();
return WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY();
}
@Override
public int getMaxY() {
return WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY();
return WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY();
}
@Override

Datei anzeigen

@ -100,13 +100,13 @@ public class StubPlatform extends AbstractPlatform {
// Use most "extreme" value
@Override
public int getVersionMinY() {
public int versionMinY() {
return -64;
}
// Use most "extreme" value
@Override
public int getVersionMaxY() {
public int versionMaxY() {
return 319;
}