Fixed issue where greenhouses could not be greated below y=0

This commit is contained in:
zorua162 2022-10-26 22:56:25 +01:00
parent 8af2b2057d
commit 092d106277
2 changed files with 3 additions and 3 deletions

View File

@ -172,7 +172,7 @@ public class Walls extends MinMaxXZ {
} }
} }
} while( y-- > 0 && wallBlockCount > 0); } while( y-- > -64 && wallBlockCount > 0);
return y + 1; return y + 1;
} }

View File

@ -91,7 +91,7 @@ public class WallsTest {
@Test @Test
public void testFindWalls() { public void testFindWalls() {
walls.findWalls(r, roof); walls.findWalls(r, roof);
assertEquals("Walls [minX=-2, maxX=11, minZ=-2, maxZ=11, floor=0]", walls.toString()); assertEquals("Walls [minX=9, maxX=11, minZ=9, maxZ=11, floor=-64]", walls.toString());
} }
/** /**
@ -181,7 +181,7 @@ public class WallsTest {
*/ */
@Test @Test
public void testGetFloorYZeroY() { public void testGetFloorYZeroY() {
assertEquals(0, walls.getFloorY(10, 0, 1, 0, 1)); assertEquals(-64, walls.getFloorY(10, 0, 1, 0, 1));
} }
/** /**