decrease scan rate

This commit is contained in:
Leijurv 2018-09-04 15:33:38 -07:00
parent 69d8bd56fa
commit 2bb01fdd20
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -17,7 +17,7 @@
package baritone.behavior.impl;
import baritone.api.event.events.TickEvent;
import baritone.api.event.events.PathEvent;
import baritone.behavior.Behavior;
import baritone.chunk.CachedChunk;
import baritone.chunk.ChunkPacker;
@ -50,10 +50,11 @@ public class MineBehavior extends Behavior {
List<String> mining;
@Override
public void onTick(TickEvent event) {
if (event.getType() == TickEvent.Type.OUT) {
return;
public void onPathEvent(PathEvent event) {
updateGoal();
}
public void updateGoal() {
if (mining == null) {
return;
}
@ -100,6 +101,7 @@ public class MineBehavior extends Behavior {
public void mine(String... mining) {
this.mining = mining == null || mining.length == 0 ? null : new ArrayList<>(Arrays.asList(mining));
updateGoal();
}
public void cancel() {