mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
step arg as min res
This commit is contained in:
@@ -75,7 +75,8 @@ public class LocateCommandAddon implements AddonInitializer {
|
|||||||
// 2. Determine Initial Step
|
// 2. Determine Initial Step
|
||||||
// If Auto: Start at radius / 2 (very coarse check).
|
// If Auto: Start at radius / 2 (very coarse check).
|
||||||
// If Manual: Use provided step.
|
// If Manual: Use provided step.
|
||||||
int currentStep = autoMode ? Integer.highestOneBit(radius - 1) : context.get("step");
|
int stepArg = context.get("step");
|
||||||
|
int currentStep = autoMode ? Integer.highestOneBit(radius - 1) : stepArg;
|
||||||
|
|
||||||
// Notify player
|
// Notify player
|
||||||
String modeMsg = autoMode ? " (Auto Mode)" : " (Step: " + currentStep + ")";
|
String modeMsg = autoMode ? " (Auto Mode)" : " (Step: " + currentStep + ")";
|
||||||
@@ -106,8 +107,8 @@ public class LocateCommandAddon implements AddonInitializer {
|
|||||||
if(!autoMode) {
|
if(!autoMode) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 3. We just ran a search at step 1 and failed (lowest resolution)
|
// 3. We just ran a search at step arg and failed (lowest resolution)
|
||||||
if(currentStep == 1) {
|
if(currentStep <= stepArg) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user