This commit is contained in:
Brian Neumann-Fopiano committed 2026-07-16 18:18:23 -04:00
1 parent 699247b1de
commit e8dd4e1127
10 files changed
+229 -36

No files matched your search

@@ -58,4 +58,26 @@ public class IrisStructureComponentOverboreTest {
"@iris-structure:v1:dHJlZXMvb2Fr:42:bWluZWNyYWZ0Om1hbnNpb24"));
assertFalse(IrisStructureComponent.isOrdinaryObjectMarker("not-a-marker"));
}
@Test
public void collidingObjectSearchCoversTheWholeMarkerOwnedObject() {
IrisStructureComponent.ObjectMarkerBounds bounds = IrisStructureComponent.markerSearchBounds(
20, 64, -8, 21, 66, -7, 7, 12, 384);
assertEquals(14, bounds.minX());
assertEquals(53, bounds.minY());
assertEquals(-14, bounds.minZ());
assertEquals(27, bounds.maxX());
assertEquals(77, bounds.maxY());
assertEquals(-1, bounds.maxZ());
}
@Test
public void collidingObjectSearchClampsToTheWorldHeight() {
IrisStructureComponent.ObjectMarkerBounds bounds = IrisStructureComponent.markerSearchBounds(
0, 2, 0, 0, 379, 0, 1, 12, 384);
assertEquals(0, bounds.minY());
assertEquals(383, bounds.maxY());
}
}
@@ -59,6 +59,19 @@ public class StructureFoundationPlannerTest {
assertTrue(StructureFoundationPlanner.isGroundSolid(null, true, 0, -20));
}
@Test
public void surfaceSupportStopsAtCarvedCaveBoundary() {
PlatformBlockState solid = mock(PlatformBlockState.class);
when(solid.isSolid()).thenReturn(true);
PlatformBlockState air = mock(PlatformBlockState.class);
when(air.isSolid()).thenReturn(false);
assertTrue(StructureFoundationPlanner.isSurfaceSupportBoundary(null, true, 18, 24));
assertTrue(StructureFoundationPlanner.isSurfaceSupportBoundary(solid, false, 30, 24));
assertFalse(StructureFoundationPlanner.isSurfaceSupportBoundary(air, false, 30, 24));
assertTrue(StructureFoundationPlanner.isSurfaceSupportBoundary(null, false, 24, 24));
}
@Test
public void fillsOnlyTheGapBetweenTheFoundationAndGround() {
List<Integer> written = new ArrayList<>();