mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-13 10:51:20 +01:00
Revert 6e734fc343
The commit was wrong. Protection range should not be decreased, as that would mean that max X and Z blocks are not included in island protection bounding box.
This change is the same as 3c65194dfb
but was missed when it was fixed.
Relate to #473
This commit is contained in:
parent
a59697c14e
commit
64b4c43742
@ -811,7 +811,12 @@ public class Island implements DataObject, MetaDataAble {
|
||||
* @since 1.5.2
|
||||
*/
|
||||
public BoundingBox getProtectionBoundingBox() {
|
||||
return new BoundingBox(getMinProtectedX(), world.getMinHeight(), getMinProtectedZ(), getMaxProtectedX()-1.0D, world.getMaxHeight(), getMaxProtectedZ()-1.0D);
|
||||
return new BoundingBox(this.getMinProtectedX(),
|
||||
this.world.getMinHeight(),
|
||||
this.getMinProtectedZ(),
|
||||
this.getMaxProtectedX(),
|
||||
this.world.getMaxHeight(),
|
||||
this.getMaxProtectedZ());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@ -564,6 +565,7 @@ public class IslandTest {
|
||||
public void testGetProtectionBoundingBox() {
|
||||
i.setWorld(world);
|
||||
assertNotNull(i.getProtectionBoundingBox());
|
||||
assertEquals("BoundingBox [minX=-100.0, minY=0.0, minZ=-100.0, maxX=100.0, maxY=0.0, maxZ=100.0]", i.getProtectionBoundingBox().toString());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user