shouldnt have been separated

This commit is contained in:
Leijurv
2023-04-07 20:45:08 -07:00
parent cc6228dced
commit 06d18c4500
4 changed files with 9 additions and 10 deletions

View File

@@ -73,10 +73,10 @@ public class NavigableSurfaceBlipTest {
}
private static void fillColumnToHeight(CountingSurface surface, int x, int z, int yHeightBlips) {
for (int i = 0; i < yHeightBlips / Blip.PER_BLOCK; i++) {
for (int i = 0; i < yHeightBlips / Blip.FULL_BLOCK; i++) {
surface.setBlock(x, i, z, FakeStates.SOLID);
}
surface.setBlock(x, yHeightBlips / Blip.PER_BLOCK, z, FakeStates.BY_HEIGHT[yHeightBlips % Blip.PER_BLOCK]);
surface.setBlock(x, yHeightBlips / Blip.FULL_BLOCK, z, FakeStates.BY_HEIGHT[yHeightBlips % Blip.FULL_BLOCK]);
}
@Test
@@ -90,7 +90,7 @@ public class NavigableSurfaceBlipTest {
int y = startY;
while (true) {
fillColumnToHeight(surface, x, 0, y);
if (!surface.connected(new BetterBlockPos(0, 1, 1), new BetterBlockPos(x, y / Blip.PER_BLOCK, 0))) {
if (!surface.connected(new BetterBlockPos(0, 1, 1), new BetterBlockPos(x, y / Blip.FULL_BLOCK, 0))) {
fillColumnToHeight(surface, x, 0, y - step);
y -= step;
break;
@@ -112,7 +112,7 @@ public class NavigableSurfaceBlipTest {
int y = startY;
while (true) {
fillColumnToHeight(surface, x, 0, y);
if (!surface.connected(new BetterBlockPos(0, 1, 1), new BetterBlockPos(x, y / Blip.PER_BLOCK, 0))) {
if (!surface.connected(new BetterBlockPos(0, 1, 1), new BetterBlockPos(x, y / Blip.FULL_BLOCK, 0))) {
fillColumnToHeight(surface, x, 0, y - 1);
y--;
break;

View File

@@ -118,7 +118,7 @@ public class PlayerPhysicsTest {
continue;
}
for (int endHeight = startHeight - 3 * Blip.PER_BLOCK; endHeight <= startHeight + 3 * Blip.PER_BLOCK; endHeight++) {
for (int endHeight = startHeight - 3 * Blip.FULL_BLOCK; endHeight <= startHeight + 3 * Blip.FULL_BLOCK; endHeight++) {
for (int endCeil = 5; endCeil <= 7; endCeil++) {
BlockStateCachedData[] toCol = makeColToHeight(endHeight);
if (endCeil < toCol.length) {
@@ -133,7 +133,7 @@ public class PlayerPhysicsTest {
int minCeilRelative = Math.min(startCeil, endCeil) - 3;
int maxBlip = Math.max(startHeight, endHeight);
if (maxBlip + Blip.PLAYER_HEIGHT_SLIGHT_OVERESTIMATE > minCeilRelative * Blip.PER_BLOCK) {
if (maxBlip + Blip.PLAYER_HEIGHT_SLIGHT_OVERESTIMATE > minCeilRelative * Blip.FULL_BLOCK) {
assertEquals(PlayerPhysics.Collision.BLOCKED, col);
continue;
}