fix an array oob with dynamic worldheight
This commit is contained in:
@@ -26,7 +26,7 @@ public class ActionCostsTest {
|
||||
|
||||
@Test
|
||||
public void testFallNBlocksCost() {
|
||||
assertEquals(FALL_N_BLOCKS_COST.length, 257); // Fall 0 blocks through fall 256 blocks
|
||||
assertEquals(FALL_N_BLOCKS_COST.length, 4097); // Fall 0 blocks through fall 4096 blocks
|
||||
for (int i = 0; i < 257; i++) {
|
||||
double blocks = ticksToBlocks(FALL_N_BLOCKS_COST[i]);
|
||||
assertEquals(blocks, i, 0.000000000001); // If you add another 0 the test fails at i=217 LOL
|
||||
|
||||
Reference in New Issue
Block a user