make right click on arrival time out after 1 second
This commit is contained in:
parent
920ce745c2
commit
166eb97c3f
@ -42,6 +42,7 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
|
||||
private BlockPos start;
|
||||
|
||||
private int tickCount = 0;
|
||||
private int arrivalTickCount = 0;
|
||||
|
||||
public GetToBlockProcess(Baritone baritone) {
|
||||
super(baritone);
|
||||
@ -53,6 +54,7 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
|
||||
gettingTo = block;
|
||||
start = ctx.playerFeet();
|
||||
blacklist = new ArrayList<>();
|
||||
arrivalTickCount = 0;
|
||||
rescan(new ArrayList<>(), new CalculationContext(baritone));
|
||||
}
|
||||
|
||||
@ -196,6 +198,10 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (arrivalTickCount++ > 20) {
|
||||
logDirect("Right click timed out");
|
||||
return true;
|
||||
}
|
||||
return false; // trying to right click, will do it next tick or so
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user