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 @Override
public int getVersionMinY() { public int versionMinY() {
return new MinecraftVersion().isEqualOrHigherThan(MinecraftVersion.CAVES_18) ? -64 : 0; return new MinecraftVersion().isEqualOrHigherThan(MinecraftVersion.CAVES_18) ? -64 : 0;
} }
@Override @Override
public int getVersionMaxY() { public int versionMaxY() {
return new MinecraftVersion().isEqualOrHigherThan(MinecraftVersion.CAVES_18) ? 319 : 255; return new MinecraftVersion().isEqualOrHigherThan(MinecraftVersion.CAVES_18) ? 319 : 255;
} }
//FAWE end //FAWE end

Datei anzeigen

@ -171,12 +171,12 @@ class CLIPlatform extends AbstractPlatform {
} }
@Override @Override
public int getVersionMinY() { public int versionMinY() {
return dataVersion >= Constants.DATA_VERSION_MC_1_18 ? -64 : 0; return dataVersion >= Constants.DATA_VERSION_MC_1_18 ? -64 : 0;
} }
@Override @Override
public int getVersionMaxY() { public int versionMaxY() {
return dataVersion >= Constants.DATA_VERSION_MC_1_18 ? 319 : 255; 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) { public RegionWrapper(final int minX, final int maxX, final int minZ, final int maxZ) {
this(minX, this(minX,
maxX, maxX,
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(), WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(),
minZ, minZ,
maxZ maxZ
); );

Datei anzeigen

@ -305,8 +305,8 @@ public class ParserContext {
minY = extent.getMinY(); minY = extent.getMinY();
maxY = extent.getMaxY(); maxY = extent.getMaxY();
} else { } else {
minY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(); minY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY();
maxY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(); maxY = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY();
} }
return minY; 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). * 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). * Get the default maximum Y value of worlds based on Minecraft version (inclusive).
*/ */
int getVersionMaxY(); int versionMaxY();
//FAWE end //FAWE end
} }

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -113,8 +113,8 @@ public abstract class BreadthFirstSearch implements Operation {
public BreadthFirstSearch(RegionFunction function) { public BreadthFirstSearch(RegionFunction function) {
//FAWE start - int depth, min/max y //FAWE start - int depth, min/max y
this(function, Integer.MAX_VALUE, this(function, Integer.MAX_VALUE,
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(), WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), null 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) { public DownwardVisitor(Mask mask, RegionFunction function, int baseY) {
//FAWE start - int depth, min/max y //FAWE start - int depth, min/max y
this(mask, function, baseY, Integer.MAX_VALUE, WorldEdit this(mask, function, baseY, Integer.MAX_VALUE, WorldEdit
.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMinY(), .getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMinY(),
WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getVersionMaxY(), null WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).versionMaxY(), null
); );
//FAWE end //FAWE end
} }

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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