mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
world bounds tweak
This commit is contained in:
@ -292,7 +292,8 @@ public final class BlockUtils {
|
||||
public static boolean isWithinWorldBounds(@NotNull WorldCompatibilityLayer worldCompatibilityLayer, @NotNull Block block) {
|
||||
World world = block.getWorld();
|
||||
|
||||
return block.getY() > worldCompatibilityLayer.getMinWorldHeight(world) && block.getY() < worldCompatibilityLayer.getMaxWorldHeight(world);
|
||||
//pretty sure both height and min height are able to have blocks placed on them
|
||||
return block.getY() >= worldCompatibilityLayer.getMinWorldHeight(world) && block.getY() <= worldCompatibilityLayer.getMaxWorldHeight(world);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,5 +7,5 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WorldCompatibilityLayer extends CompatibilityLayer {
|
||||
default int getMinWorldHeight(@NotNull World world) { return 0; }
|
||||
|
||||
default int getMaxWorldHeight(@NotNull World world) { return 255; }
|
||||
default int getMaxWorldHeight(@NotNull World world) { return 256; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user