ChestFarmer: Updates

This commit is contained in:
noil 2021-11-19 22:47:10 -05:00
parent 2819bcc8c4
commit eb7dd5cc15
1 changed files with 5 additions and 3 deletions

View File

@ -105,8 +105,7 @@ public final class ChestFarmerModule extends Module {
final BlockPos east = interpolatedPos.east();
final BlockPos west = interpolatedPos.west();
final BlockPos[] possibleBlocks = new BlockPos[]{north.down(), south.down(), east.down(), west.down(),
north, south, east, west};
final BlockPos[] possibleBlocks = new BlockPos[]{north, south, east, west};
if (this.mineRotationTask.isOnline()) {
if (mc.world.loadedTileEntityList.stream().noneMatch(tileEntity -> tileEntity instanceof TileEntityEnderChest)) {
@ -219,8 +218,11 @@ public final class ChestFarmerModule extends Module {
}
private boolean valid(BlockPos pos) {
if (mc.player == null)
return false;
// there are no entities colliding with block placement
if (!mc.world.checkNoEntityCollision(new AxisAlignedBB(pos)))
if (!mc.world.checkNoEntityCollision(new AxisAlignedBB(pos), mc.player))
return false;
// player is too far from distance