settings for right click and enter portal

This commit is contained in:
Leijurv 2018-12-07 16:54:12 -08:00
parent d5e155d77f
commit efe06264bd
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 17 additions and 0 deletions

View File

@ -184,6 +184,17 @@ public class Settings {
public Setting<Integer> mobAvoidanceRadius = new Setting<>(8);
/**
* When running a goto towards a container block (chest, ender chest, furnace, etc),
* right click and open it once you arrive.
*/
public Setting<Boolean> rightClickContainerOnArrival = new Setting<>(true);
/**
* When running a goto towards a nether portal block, walk all the way into the portal
* instead of stopping one block before.
*/
public Setting<Boolean> enterPortal = new Setting<>(true);
/**
* Don't repropagate cost improvements below 0.01 ticks. They're all just floating point inaccuracies,

View File

@ -142,10 +142,16 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
}
private boolean walkIntoInsteadOfAdjacent(Block block) {
if (!Baritone.settings().enterPortal.get()) {
return false;
}
return block == Blocks.PORTAL;
}
private boolean rightClickOnArrival(Block block) {
if (!Baritone.settings().rightClickContainerOnArrival.get()) {
return false;
}
return block == Blocks.CRAFTING_TABLE || block == Blocks.FURNACE || block == Blocks.ENDER_CHEST || block == Blocks.CHEST || block == Blocks.TRAPPED_CHEST;
}
}