mirror of https://github.com/cabaletta/baritone
oops
This commit is contained in:
parent
407f4dbbae
commit
bfa644e7a7
|
@ -66,7 +66,7 @@ public interface ActionCosts {
|
|||
|
||||
static double[] generateFallNBlocksCost() {
|
||||
double[] costs = new double[4097];
|
||||
for (int i = 0; i < 4096; i++) {
|
||||
for (int i = 0; i < 4097; i++) {
|
||||
costs[i] = distanceToTicks(i);
|
||||
}
|
||||
return costs;
|
||||
|
|
|
@ -27,9 +27,9 @@ public class ActionCostsTest {
|
|||
@Test
|
||||
public void testFallNBlocksCost() {
|
||||
assertEquals(FALL_N_BLOCKS_COST.length, 4097); // Fall 0 blocks through fall 4096 blocks
|
||||
for (int i = 0; i < 257; i++) {
|
||||
for (int i = 0; i < 4097; 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
|
||||
assertEquals(blocks, i, 0.00000000001); // If you add another 0 the test fails at i=989 LOL
|
||||
}
|
||||
assertEquals(FALL_1_25_BLOCKS_COST, 6.2344, 0.00001);
|
||||
assertEquals(FALL_0_25_BLOCKS_COST, 3.0710, 0.00001);
|
||||
|
|
Loading…
Reference in New Issue