mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
shift some code to EditSessionBuilder
This commit is contained in:
@ -56,17 +56,6 @@ public abstract class FaweRegionExtent extends ResettableExtent {
|
||||
return contains(p.getBlockX(), p.getBlockZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 location, B block) throws WorldEditException {
|
||||
if (!contains(location)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return super.setBlock(location, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block) throws WorldEditException {
|
||||
if (!contains(x, y, z)) {
|
||||
@ -78,17 +67,6 @@ public abstract class FaweRegionExtent extends ResettableExtent {
|
||||
return super.setBlock(x, y, z, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBiome(BlockVector2 position, BiomeType biome) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return super.setBiome(position, biome);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||
if (!contains(x, y, z)) {
|
||||
@ -110,7 +88,18 @@ public abstract class FaweRegionExtent extends ResettableExtent {
|
||||
}
|
||||
return super.getBiome(position);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BiomeType getBiome(int x, int z) {
|
||||
if (!contains(x, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return super.getBiome(x, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getFullBlock(BlockVector3 position) {
|
||||
if (!contains(position)) {
|
||||
@ -133,28 +122,6 @@ public abstract class FaweRegionExtent extends ResettableExtent {
|
||||
return super.getBlock(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getLazyBlock(BlockVector3 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
|
||||
}
|
||||
return EditSession.nullBlock;
|
||||
}
|
||||
return super.getLazyBlock(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getLazyBlock(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
|
||||
}
|
||||
return EditSession.nullBlock;
|
||||
}
|
||||
return super.getLazyBlock(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
|
Reference in New Issue
Block a user