Skip to content

Commit

Permalink
allow farther range for building pos return (#10402)
Browse files Browse the repository at this point in the history
Allow farther distance if building returns its own pos for standing
  • Loading branch information
Raycoms authored Nov 4, 2024
1 parent 1b18546 commit b4c62af
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,17 @@ public int getTotalRequiredAmount(final ItemStack deliveredItemStack)
protected final boolean walkToBuilding()
{
@Nullable final IBuilding ownBuilding = building;
return ownBuilding == null || walkToBlock(ownBuilding.getStandingPosition(), 1);
if (ownBuilding == null)
{
return true;
}
final BlockPos standingPos = ownBuilding.getStandingPosition();
int range = 1;
if (standingPos.equals(ownBuilding.getPosition()))
{
range = 3;
}
return walkToBlock(ownBuilding.getStandingPosition(), range);
}

/**
Expand Down

0 comments on commit b4c62af

Please sign in to comment.