Skip to content

Commit

Permalink
ChestFarmer: Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
uoil committed Nov 20, 2021
1 parent 2819bcc commit eb7dd5c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ public void onWalkingUpdate(EventUpdateWalkingPlayer event) {
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)) {
Expand Down Expand Up @@ -219,8 +218,11 @@ private boolean canBreak(BlockPos pos) {
}

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
Expand Down

0 comments on commit eb7dd5c

Please sign in to comment.