0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Fix Excavator still sometimes getting stuck on unbreakable blocks

This commit is contained in:
Alexander01998 2024-05-24 10:39:09 +02:00
parent daebd4bd37
commit ec68d44538

View File

@ -569,7 +569,8 @@ public final class ExcavatorHack extends Hack
return BlockUtils.getAllInBoxStream(eyesBlock, blockRange)
.filter(pos -> pos.getSquaredDistance(eyesVec) <= rangeSq)
.filter(BlockUtils::canBeClicked).filter(area.blocksSet::contains)
.filter(area.blocksSet::contains).filter(BlockUtils::canBeClicked)
.filter(pos -> !BlockUtils.isUnbreakable(pos))
.sorted(Comparator
.comparingDouble(pos -> pos.getSquaredDistance(eyesVec)))
.collect(Collectors.toCollection(ArrayList::new));