readd costs

This commit is contained in:
Leijurv 2018-09-23 18:00:54 -07:00
parent 23e1ea0020
commit fa7a0b3c45
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -19,9 +19,9 @@ package baritone.utils;
import baritone.Baritone; import baritone.Baritone;
import baritone.api.Settings; import baritone.api.Settings;
import baritone.api.event.events.ChatEvent;
import baritone.api.pathing.goals.Goal; import baritone.api.pathing.goals.Goal;
import baritone.behavior.Behavior; import baritone.behavior.Behavior;
import baritone.api.event.events.ChatEvent;
import baritone.behavior.FollowBehavior; import baritone.behavior.FollowBehavior;
import baritone.behavior.MineBehavior; import baritone.behavior.MineBehavior;
import baritone.behavior.PathingBehavior; import baritone.behavior.PathingBehavior;
@ -30,7 +30,7 @@ import baritone.cache.Waypoint;
import baritone.cache.WorldProvider; import baritone.cache.WorldProvider;
import baritone.pathing.calc.AbstractNodeCostSearch; import baritone.pathing.calc.AbstractNodeCostSearch;
import baritone.pathing.goals.*; import baritone.pathing.goals.*;
import baritone.pathing.movement.MovementHelper; import baritone.pathing.movement.*;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.multiplayer.ChunkProviderClient; import net.minecraft.client.multiplayer.ChunkProviderClient;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -39,6 +39,8 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class ExampleBaritoneControl extends Behavior implements Helper { public class ExampleBaritoneControl extends Behavior implements Helper {
@ -429,10 +431,8 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
event.cancel(); event.cancel();
return; return;
} }
// TODO if (msg.equals("costs")) {
/*if (msg.equals("costs")) { List<Movement> moves = Stream.of(Moves.values()).map(x -> x.apply0(playerFeet())).collect(Collectors.toCollection(ArrayList::new));
Movement[] movements = AStarPathFinder.getConnectedPositions(new BetterBlockPos(playerFeet()), new CalculationContext());
List<Movement> moves = new ArrayList<>(Arrays.asList(movements));
while (moves.contains(null)) { while (moves.contains(null)) {
moves.remove(null); moves.remove(null);
} }
@ -448,6 +448,6 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
} }
event.cancel(); event.cancel();
return; return;
}*/ }
} }
} }