diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index ece3b23f..42273335 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -151,7 +151,7 @@ public final class Settings { * Blocks that Baritone will attempt to avoid (Used in avoidance) */ public final Setting> blocksToAvoid = new Setting<>(new ArrayList<>(Arrays.asList( - Blocks.VINE + // Leave Empty by Default ))); /** diff --git a/src/main/java/baritone/utils/pathing/Avoidance.java b/src/main/java/baritone/utils/pathing/Avoidance.java index f1b2cac7..9b32b1df 100644 --- a/src/main/java/baritone/utils/pathing/Avoidance.java +++ b/src/main/java/baritone/utils/pathing/Avoidance.java @@ -19,10 +19,8 @@ package baritone.utils.pathing; import baritone.Baritone; import baritone.api.utils.BetterBlockPos; -import baritone.api.utils.BlockUtils; import baritone.api.utils.IPlayerContext; import it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap; -import net.minecraft.block.Block; import net.minecraft.entity.monster.EntityMob; import net.minecraft.util.math.BlockPos; @@ -65,18 +63,12 @@ public class Avoidance { List res = new ArrayList<>(); double mobSpawnerCoeff = Baritone.settings().mobSpawnerAvoidanceCoefficient.value; double mobCoeff = Baritone.settings().mobAvoidanceCoefficient.value; - double blockCoeff = Baritone.settings().blockAvoidanceCoefficient.value; if (mobSpawnerCoeff != 1.0D) { ctx.worldData().getCachedWorld().getLocationsOf("mob_spawner", 1, ctx.playerFeet().x, ctx.playerFeet().z, 2).forEach(mobspawner -> res.add(new Avoidance(mobspawner, mobSpawnerCoeff, Baritone.settings().mobSpawnerAvoidanceRadius.value))); } if (mobCoeff != 1.0D) { ctx.world().loadedEntityList.stream().filter(entity -> entity instanceof EntityMob).forEach(entity -> res.add(new Avoidance(new BlockPos(entity), mobCoeff, Baritone.settings().mobAvoidanceRadius.value))); } - if (blockCoeff != 1.0D) { - for (Block block : Baritone.settings().blocksToAvoid.value) { - ctx.worldData().getCachedWorld().getLocationsOf(BlockUtils.blockToString(block), 1, ctx.playerFeet().x, ctx.playerFeet().z, 2).forEach(blockPos -> res.add(new Avoidance(blockPos, blockCoeff, Baritone.settings().blockAvoidanceRadius.value))); - } - } return res; }