[Solved] Taxicab Distance Procedure

Started by LincolnX on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved] Taxicab Distance Procedure
Sun, 04/12/2026 - 00:17 (edited)

Hello! I've come across a problem i've needed to face, how can i detect a block in a taxicab distance away from it in all three axes? I know it's very easy to do that in a cubical detection with nested repeats, but how can i do it with taxicab distance? Thanks

Edited by LincolnX on Sun, 04/12/2026 - 00:17
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I found a simple way to do…
Sun, 04/12/2026 - 00:16

procedure

I found a simple way to do it, i don't know if it is the most efficient approach, but it works well. You can replace the "2" in the righthand block in the less than or equals to block to the radius.