Skip to content

Commit

Permalink
Add buildIgnoreBlocks to highwaybuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
mankool0 committed Aug 29, 2024
1 parent c6fc087 commit 82ee223
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/baritone/behavior/highway/HighwayContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -1396,8 +1396,8 @@ public HighwayBlockState isHighwayCorrect(BlockPos startPos, BlockPos startPosLi
if (!schematic.inSchematic(x, y, z, current)) {
continue;
}
BlockState desiredState = schematic.desiredState(x, y, z, current, this.approxPlaceable);
if (i == 1) {
BlockState desiredState = schematic.desiredState(x, y, z, current, this.approxPlaceable);
if (desiredState.getBlock() instanceof AirBlock) {
renderBlocksBuilding.put(new BlockPos(blockX, blockY, blockZ), Color.CYAN);
} else if (desiredState.getBlock().equals(Blocks.NETHERRACK)) {
Expand All @@ -1417,7 +1417,7 @@ public HighwayBlockState isHighwayCorrect(BlockPos startPos, BlockPos startPosLi
continue;
}

if (!schematic.desiredState(x, y, z, current, this.approxPlaceable).equals(current)) {
if (!desiredState.equals(current)) {
if (!baritone.getBuilderProcess().checkNoEntityCollision(new AABB(new BlockPos(blockX, blockY, blockZ)), playerContext.player())) {
List<Entity> entityList = playerContext.world().getEntities(null, new AABB(new BlockPos(blockX, blockY, blockZ)));
for (Entity entity : entityList) {
Expand All @@ -1430,6 +1430,9 @@ public HighwayBlockState isHighwayCorrect(BlockPos startPos, BlockPos startPosLi
}
}

if (desiredState.getBlock() instanceof AirBlock && Baritone.settings().buildIgnoreBlocks.value.contains(current.getBlock())) {
continue;
}
// Never should be liquids
if (current.getBlock() instanceof LiquidBlock) {
renderLockBuilding.unlock();
Expand Down

0 comments on commit 82ee223

Please sign in to comment.