Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
@MethodsReturnNonnullByDefault
public interface IMinMaxHeight {
/**
* Returns Y position of the bottom block in the world
* Returns Y position of the bottom block in the world,
* inclusive
*
* @return the bottom of the world
*/
Expand All @@ -42,6 +43,7 @@ default int getMinHeight() {

/**
* Returns Y position of block above the top block in the world,
* exclusive
*
* @return the top of the world
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ private int modifySectionArrayLength(int sixteen, World worldIn, int x, int z) {
}
if (!((ICubicWorld) worldIn).isCubicWorld()) {
IMinMaxHeight y = (IMinMaxHeight) worldIn;
return Coords.blockToCube(y.getMaxHeight()) - Coords.blockToCube(y.getMinHeight());
int firstInclusiveY = y.getMinHeight();
int lastInclusiveY = y.getMaxHeight() - 1;
return Coords.blockToCube(lastInclusiveY) - Coords.blockToCube(firstInclusiveY) + 1;
}
return sixteen;
}
Expand Down