fix some scuff from minebot
This commit is contained in:
parent
c931cde3ae
commit
920ce745c2
@ -160,9 +160,12 @@ public final class Settings {
|
|||||||
/**
|
/**
|
||||||
* Blocks that Baritone is not allowed to break
|
* Blocks that Baritone is not allowed to break
|
||||||
*/
|
*/
|
||||||
public final Setting<List<Block>> blocksToAvoidBreaking = new Setting<>(new ArrayList<>(
|
public final Setting<List<Block>> blocksToAvoidBreaking = new Setting<>(new ArrayList<>(Arrays.asList(
|
||||||
// e.g. crafting table, beds
|
Blocks.CRAFTING_TABLE,
|
||||||
));
|
Blocks.FURNACE,
|
||||||
|
Blocks.LIT_FURNACE,
|
||||||
|
Blocks.CHEST
|
||||||
|
)));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables some more advanced vine features. They're honestly just gimmicks and won't ever be needed in real
|
* Enables some more advanced vine features. They're honestly just gimmicks and won't ever be needed in real
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
package baritone.pathing.movement;
|
package baritone.pathing.movement;
|
||||||
|
|
||||||
import baritone.Baritone;
|
import baritone.Baritone;
|
||||||
|
import baritone.api.BaritoneAPI;
|
||||||
import baritone.api.IBaritone;
|
import baritone.api.IBaritone;
|
||||||
import baritone.api.pathing.movement.ActionCosts;
|
import baritone.api.pathing.movement.ActionCosts;
|
||||||
import baritone.api.pathing.movement.MovementStatus;
|
import baritone.api.pathing.movement.MovementStatus;
|
||||||
@ -55,8 +56,7 @@ public interface MovementHelper extends ActionCosts, Helper {
|
|||||||
|| bsi.get0(x + 1, y, z).getBlock() instanceof BlockLiquid
|
|| bsi.get0(x + 1, y, z).getBlock() instanceof BlockLiquid
|
||||||
|| bsi.get0(x - 1, y, z).getBlock() instanceof BlockLiquid
|
|| bsi.get0(x - 1, y, z).getBlock() instanceof BlockLiquid
|
||||||
|| bsi.get0(x, y, z + 1).getBlock() instanceof BlockLiquid
|
|| bsi.get0(x, y, z + 1).getBlock() instanceof BlockLiquid
|
||||||
|| bsi.get0(x, y, z - 1).getBlock() instanceof BlockLiquid
|
|| bsi.get0(x, y, z - 1).getBlock() instanceof BlockLiquid;
|
||||||
|| Baritone.settings().blocksToAvoidBreaking.value.contains(b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean canWalkThrough(IPlayerContext ctx, BetterBlockPos pos) {
|
static boolean canWalkThrough(IPlayerContext ctx, BetterBlockPos pos) {
|
||||||
@ -363,7 +363,7 @@ public interface MovementHelper extends ActionCosts, Helper {
|
|||||||
if (block instanceof BlockLiquid) {
|
if (block instanceof BlockLiquid) {
|
||||||
return COST_INF;
|
return COST_INF;
|
||||||
}
|
}
|
||||||
double m = Blocks.CRAFTING_TABLE.equals(block) ? 10 : 1; // TODO see if this is still necessary. it's from MineBot when we wanted to penalize breaking its crafting table
|
double m = Baritone.settings().blocksToAvoidBreaking.value.contains(block) ? 10 : 1;
|
||||||
double strVsBlock = context.toolSet.getStrVsBlock(state);
|
double strVsBlock = context.toolSet.getStrVsBlock(state);
|
||||||
if (strVsBlock <= 0) {
|
if (strVsBlock <= 0) {
|
||||||
return COST_INF;
|
return COST_INF;
|
||||||
|
Loading…
Reference in New Issue
Block a user