mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix region restrictions with methods non-overriden (#1948)
Fix region registrictions with methods non-overriden See https://github.com/IntellectualSites/fastasyncvoxelsniper/issues/195 for context
This commit is contained in:
parent
a32d8dcbdb
commit
2e386ea391
@ -96,13 +96,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BiomeType getBiome(BlockVector3 position) {
|
public BiomeType getBiome(BlockVector3 position) {
|
||||||
if (!contains(position)) {
|
return getBiomeType(position.getX(), position.getY(), position.getZ());
|
||||||
if (!limit.MAX_FAILS()) {
|
|
||||||
WEManager.weManager().cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return super.getBiome(position);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -118,24 +112,34 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseBlock getFullBlock(BlockVector3 position) {
|
public BaseBlock getFullBlock(BlockVector3 position) {
|
||||||
if (!contains(position)) {
|
return getFullBlock(position.getX(), position.getY(), position.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseBlock getFullBlock(int x, int y, int z) {
|
||||||
|
if (!contains(x, y, z)) {
|
||||||
if (!limit.MAX_FAILS()) {
|
if (!limit.MAX_FAILS()) {
|
||||||
WEManager.weManager().cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
WEManager.weManager().cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||||
}
|
}
|
||||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||||
}
|
}
|
||||||
return super.getFullBlock(position);
|
return super.getFullBlock(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getBlock(BlockVector3 position) {
|
public BlockState getBlock(BlockVector3 position) {
|
||||||
if (!contains(position)) {
|
return getBlock(position.getX(), position.getY(), position.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getBlock(int x, int y, int z) {
|
||||||
|
if (!contains(x, y, z)) {
|
||||||
if (!limit.MAX_FAILS()) {
|
if (!limit.MAX_FAILS()) {
|
||||||
WEManager.weManager().cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
WEManager.weManager().cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||||
}
|
}
|
||||||
return BlockTypes.AIR.getDefaultState();
|
return BlockTypes.AIR.getDefaultState();
|
||||||
}
|
}
|
||||||
return super.getBlock(position);
|
return super.getBlock(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Loading…
Reference in New Issue
Block a user