mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
More Kotlin
This commit is contained in:
@ -71,7 +71,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block) throws WorldEditException {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -82,7 +82,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -93,7 +93,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BiomeType getBiome(BlockVector2 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -104,7 +104,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BiomeType getBiomeType(int x, int y, int z) {
|
||||
if (!contains(x, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -115,7 +115,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BaseBlock getFullBlock(BlockVector3 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
}
|
||||
@ -126,7 +126,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BlockState getBlock(BlockVector3 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return BlockTypes.AIR.getDefaultState();
|
||||
}
|
||||
@ -137,7 +137,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getBlockLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -148,7 +148,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getBrightness(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -159,7 +159,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -170,7 +170,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getOpacity(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -181,7 +181,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getSkyLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -193,7 +193,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
if (!contains(location.getBlockX(), location.getBlockY(), location.getBlockZ())) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getOUTSIDE_REGION());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class MemoryCheckingExtent extends PassthroughExtent {
|
||||
this.player.print(TranslatableComponent.of("fawe.info.worldedit.oom.admin"));
|
||||
}
|
||||
}
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.LOW_MEMORY);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.INSTANCE.getLOW_MEMORY());
|
||||
}
|
||||
return super.getExtent();
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor {
|
||||
}
|
||||
|
||||
public NullExtent() {
|
||||
this(new com.sk89q.worldedit.extent.NullExtent(), FaweCache.MANUAL);
|
||||
this(new com.sk89q.worldedit.extent.NullExtent(), FaweCache.INSTANCE.getMANUAL());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +38,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
return null;
|
||||
}
|
||||
if (!limit.MAX_ENTITIES()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_ENTITIES);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getMAX_ENTITIES());
|
||||
return null;
|
||||
}
|
||||
return super.createEntity(location, entity);
|
||||
@ -47,7 +47,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
@Override
|
||||
public BlockState getBlock(int x, int y, int z) {
|
||||
if (!limit.MAX_CHECKS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_CHECKS);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getMAX_CHECKS());
|
||||
return BlockTypes.AIR.getDefaultState();
|
||||
} else {
|
||||
return extent.getBlock(x, y, z);
|
||||
@ -57,7 +57,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
@Override
|
||||
public BaseBlock getFullBlock(BlockVector3 pos) {
|
||||
if (!limit.MAX_CHECKS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_CHECKS);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getMAX_CHECKS());
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
} else {
|
||||
return extent.getFullBlock(pos);
|
||||
@ -79,18 +79,18 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
boolean hasNbt = block instanceof BaseBlock && block.hasNbtData();
|
||||
if (hasNbt) {
|
||||
if (!limit.MAX_BLOCKSTATES()) {
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.MAX_TILES);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.INSTANCE.getMAX_TILES());
|
||||
return false;
|
||||
} else {
|
||||
if (!limit.MAX_CHANGES()) {
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.MAX_CHANGES);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.INSTANCE.getMAX_CHANGES());
|
||||
return false;
|
||||
}
|
||||
return extent.setBlock(x, y, z, block);
|
||||
}
|
||||
}
|
||||
if (!limit.MAX_CHANGES()) {
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.MAX_CHANGES);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.INSTANCE.getMAX_CHANGES());
|
||||
return false;
|
||||
} else {
|
||||
return extent.setBlock(x, y, z, block);
|
||||
@ -100,7 +100,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
@Override
|
||||
public boolean setBiome(BlockVector2 position, BiomeType biome) {
|
||||
if (!limit.MAX_CHANGES()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_CHANGES);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.INSTANCE.getMAX_CHANGES());
|
||||
return false;
|
||||
}
|
||||
return super.setBiome(position, biome);
|
||||
|
Reference in New Issue
Block a user